diff --git a/src/stores/utils/index.ts b/src/stores/utils/index.ts index fd672e2d..6e376bc0 100644 --- a/src/stores/utils/index.ts +++ b/src/stores/utils/index.ts @@ -289,6 +289,7 @@ export function manageAttachment( name: string; file: File; onUploadProgress?: (e: AxiosProgressEvent) => void; + abortController?: AbortController; }) => { const res = await api.put( `/${base}/${opts.parentId}/attachment/${opts.name}`, @@ -300,6 +301,7 @@ export function manageAttachment( : option?.onUploadProgress ? option.onUploadProgress : (e) => console.log(e), + signal: opts.abortController?.signal, }, ); if (res.status < 400) return true;