[release-2.17] fix: resolve potential exception during bulk image upload in post creation (#6282)

This is an automated cherry-pick of #6276

/assign ruibaby

```release-note
修复创建文章前批量上传图片可能出现异常的问题。
```
pull/6324/head
Halo Dev Bot 2024-07-05 18:39:07 +08:00 committed by GitHub
parent 7292bd71cc
commit 34f789ec30
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 0 additions and 10 deletions

View File

@ -431,9 +431,6 @@ async function handleUploadImage(file: File, options?: AxiosRequestConfig) {
if (!currentUserHasPermission(["uc:attachments:manage"])) {
return;
}
if (!isUpdateMode.value) {
await handleSave();
}
const { data } = await ucApiClient.storage.attachment.createAttachmentForPost(
{

View File

@ -456,10 +456,6 @@ async function handleUploadImage(file: File, options?: AxiosRequestConfig) {
return;
}
if (!isUpdateMode.value) {
await handleSave();
}
const { data } = await ucApiClient.storage.attachment.createAttachmentForPost(
{
file,

View File

@ -422,9 +422,6 @@ async function handleUploadImage(file: File, options?: AxiosRequestConfig) {
if (!currentUserHasPermission(["uc:attachments:manage"])) {
return;
}
if (!isUpdateMode.value) {
await handleCreate();
}
const { data } = await ucApiClient.storage.attachment.createAttachmentForPost(
{