From 34f789ec30ae3a19195994de9bb720888e367520 Mon Sep 17 00:00:00 2001 From: Halo Dev Bot <87291978+halo-dev-bot@users.noreply.github.com> Date: Fri, 5 Jul 2024 18:39:07 +0800 Subject: [PATCH] [release-2.17] fix: resolve potential exception during bulk image upload in post creation (#6282) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is an automated cherry-pick of #6276 /assign ruibaby ```release-note 修复创建文章前批量上传图片可能出现异常的问题。 ``` --- ui/console-src/modules/contents/pages/SinglePageEditor.vue | 3 --- ui/console-src/modules/contents/posts/PostEditor.vue | 4 ---- ui/uc-src/modules/contents/posts/PostEditor.vue | 3 --- 3 files changed, 10 deletions(-) diff --git a/ui/console-src/modules/contents/pages/SinglePageEditor.vue b/ui/console-src/modules/contents/pages/SinglePageEditor.vue index 3f217e99c..6287f2e5c 100644 --- a/ui/console-src/modules/contents/pages/SinglePageEditor.vue +++ b/ui/console-src/modules/contents/pages/SinglePageEditor.vue @@ -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( { diff --git a/ui/console-src/modules/contents/posts/PostEditor.vue b/ui/console-src/modules/contents/posts/PostEditor.vue index 17cc5cb01..f55527c48 100644 --- a/ui/console-src/modules/contents/posts/PostEditor.vue +++ b/ui/console-src/modules/contents/posts/PostEditor.vue @@ -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, diff --git a/ui/uc-src/modules/contents/posts/PostEditor.vue b/ui/uc-src/modules/contents/posts/PostEditor.vue index 1de04b98d..50f4524a6 100644 --- a/ui/uc-src/modules/contents/posts/PostEditor.vue +++ b/ui/uc-src/modules/contents/posts/PostEditor.vue @@ -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( {