diff --git a/client/src/components/Upload/DefaultBox.vue b/client/src/components/Upload/DefaultBox.vue index 31722c9184a0..cba474744251 100644 --- a/client/src/components/Upload/DefaultBox.vue +++ b/client/src/components/Upload/DefaultBox.vue @@ -113,15 +113,15 @@ const queue = new UploadQueue({ }); /** Add files to queue */ -function addFiles(files) { +function addFiles(files, immediate = false) { if (!isRunning.value) { + if (immediate || !props.multiple) { + eventReset(); + } if (props.multiple) { queue.add(files); - } else { - eventReset(); - if (files.length > 0) { - queue.add([files[0]]); - } + } else if (files.length > 0) { + queue.add([files[0]]); } } } diff --git a/client/src/components/Upload/UploadContainer.vue b/client/src/components/Upload/UploadContainer.vue index ba4fa08dbcc6..9c7fe5a742dc 100644 --- a/client/src/components/Upload/UploadContainer.vue +++ b/client/src/components/Upload/UploadContainer.vue @@ -112,7 +112,7 @@ const showRegular = computed(() => !props.formats || hasRegularExtension); const showRules = computed(() => !props.formats || props.multiple); function immediateUpload(files) { - regular.value?.addFiles(files); + regular.value?.addFiles(files, true); } function toData(items, history_id, composite = false) { diff --git a/client/src/components/Upload/UploadModal.vue b/client/src/components/Upload/UploadModal.vue index 8aca0acde0dc..762abcc9afc0 100644 --- a/client/src/components/Upload/UploadModal.vue +++ b/client/src/components/Upload/UploadModal.vue @@ -86,7 +86,6 @@ defineExpose({