diff --git a/changes/changelog.d/1999.enhancement b/changes/changelog.d/1999.enhancement new file mode 100644 index 000000000..807a19be2 --- /dev/null +++ b/changes/changelog.d/1999.enhancement @@ -0,0 +1 @@ +Update upload status when import fails (#1999) diff --git a/front/src/components/library/FileUpload.vue b/front/src/components/library/FileUpload.vue index 29b57e77b..863cad349 100644 --- a/front/src/components/library/FileUpload.vue +++ b/front/src/components/library/FileUpload.vue @@ -128,6 +128,15 @@ useWebSocketHandler('import.status_updated', async (event) => { // TODO (wvffle): Why? await nextTick() + if (event.new_status === 'errored') { + for (const file of files.value) { + if (file.response?.uuid === event.upload.uuid) { + file.error = event.new_status + break + } + } + } + uploads[event.old_status] -= 1 uploads[event.new_status] += 1 uploads.objects[event.upload.uuid] = event.upload