Skip to content

Commit

Permalink
fix: resolve potential exception during bulk image upload in post cre…
Browse files Browse the repository at this point in the history
…ation (#6276)

Signed-off-by: Ryan Wang <[email protected]>
  • Loading branch information
ruibaby authored Jul 5, 2024
1 parent 104bd3e commit ed5f9ae
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 ed5f9ae

Please sign in to comment.