From bc3b8f9ca7b5d4d13a25ceeb6efd8d26f42eb979 Mon Sep 17 00:00:00 2001 From: Methapon2001 <61303214+Methapon2001@users.noreply.github.com> Date: Wed, 13 Dec 2023 13:53:53 +0700 Subject: [PATCH] fix: update not upload file --- Services/client/src/stores/storage.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Services/client/src/stores/storage.ts b/Services/client/src/stores/storage.ts index d63b7e4..4c7740c 100644 --- a/Services/client/src/stores/storage.ts +++ b/Services/client/src/stores/storage.ts @@ -420,7 +420,7 @@ const useStorage = defineStore('storageStore', () => { constructUrl(arr.slice(0, -1), false) + `/file/${arr[arr.length - 1]}`, { file: file?.name, ...data }, ) - if (res && res.status === 201 && res.data && res.data.upload) { + if (res && res.status === 200 && res.data && res.data.upload) { await axios .put(res.data.upload, file, { headers: { 'Content-Type': file?.type },