mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-25 01:39:53 +00:00
UBERF-9110 Proper delete file status check (#7665)
Some checks are pending
CI / build (push) Waiting to run
CI / svelte-check (push) Blocked by required conditions
CI / formatting (push) Blocked by required conditions
CI / test (push) Blocked by required conditions
CI / uitest (push) Waiting to run
CI / uitest-pg (push) Waiting to run
CI / uitest-qms (push) Waiting to run
CI / docker-build (push) Blocked by required conditions
CI / dist-build (push) Blocked by required conditions
Some checks are pending
CI / build (push) Waiting to run
CI / svelte-check (push) Blocked by required conditions
CI / formatting (push) Blocked by required conditions
CI / test (push) Blocked by required conditions
CI / uitest (push) Waiting to run
CI / uitest-pg (push) Waiting to run
CI / uitest-qms (push) Waiting to run
CI / docker-build (push) Blocked by required conditions
CI / dist-build (push) Blocked by required conditions
Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com>
This commit is contained in:
parent
e81100cbaf
commit
81c1f49f12
@ -200,7 +200,7 @@ export async function deleteFile (id: string): Promise<void> {
|
||||
}
|
||||
})
|
||||
|
||||
if (resp.status !== 200) {
|
||||
if (!resp.ok) {
|
||||
throw new Error('Failed to delete file')
|
||||
}
|
||||
}
|
||||
@ -217,7 +217,7 @@ async function uploadFileWithFormData (file: File, uuid: string, uploadUrl: stri
|
||||
body: data
|
||||
})
|
||||
|
||||
if (resp.status !== 200) {
|
||||
if (!resp.ok) {
|
||||
if (resp.status === 413) {
|
||||
throw new PlatformError(new Status(Severity.ERROR, plugin.status.FileTooLarge, {}))
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user