Skip to content

Commit

Permalink
[release-2.17] fix: resolve potential exception during bulk image upl…
Browse files Browse the repository at this point in the history
…oad in post creation (#6282)

This is an automated cherry-pick of #6276

/assign ruibaby

```release-note
修复创建文章前批量上传图片可能出现异常的问题。
```
  • Loading branch information
halo-dev-bot authored Jul 5, 2024
1 parent 7292bd7 commit 34f789e
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 10 deletions.
3 changes: 0 additions & 3 deletions ui/console-src/modules/contents/pages/SinglePageEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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(
{
Expand Down
4 changes: 0 additions & 4 deletions ui/console-src/modules/contents/posts/PostEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 0 additions & 3 deletions ui/uc-src/modules/contents/posts/PostEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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(
{
Expand Down

0 comments on commit 34f789e

Please sign in to comment.