fix: resolve potential exception during bulk image upload in post creation (#6276)

Signed-off-by: Ryan Wang <i@ryanc.cc>
pull/6297/head
Ryan Wang 2024-07-05 18:21:46 +08:00 committed by GitHub
parent 104bd3e44e
commit ed5f9aeb50
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"])) { if (!currentUserHasPermission(["uc:attachments:manage"])) {
return; return;
} }
if (!isUpdateMode.value) {
await handleSave();
}
const { data } = await ucApiClient.storage.attachment.createAttachmentForPost( const { data } = await ucApiClient.storage.attachment.createAttachmentForPost(
{ {

View File

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

View File

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