diff --git a/l10n/messages.pot b/l10n/messages.pot
index af7df9cb..2e985e69 100644
--- a/l10n/messages.pot
+++ b/l10n/messages.pot
@@ -79,6 +79,9 @@ msgstr ""
msgid "Preview image"
msgstr ""
+msgid "Processing..."
+msgstr ""
+
msgid "Rename"
msgstr ""
diff --git a/lib/components/UploadPicker.vue b/lib/components/UploadPicker.vue
index bc297e6a..d510650f 100644
--- a/lib/components/UploadPicker.vue
+++ b/lib/components/UploadPicker.vue
@@ -126,6 +126,11 @@
+
+
+
{{ t('Processing...') }}
+
+
upload.status === UploadStatus.FAILED).length !== 0
},
isUploading() {
- return this.queue?.length > 0
+ return this.queue?.filter((upload: Upload) => upload.status === UploadStatus.UPLOADING).length !== 0
},
isAssembling() {
return this.queue?.filter((upload: Upload) => upload.status === UploadStatus.ASSEMBLING).length !== 0
@@ -394,7 +401,6 @@ export default Vue.extend({
return Array.isArray(this.content) ? this.content : await this.content(path)
},
-
/**
* Start uploading
*/
@@ -507,6 +513,12 @@ $progress-width: 200px;
&--paused &__progress {
animation: breathing 3s ease-out infinite normal;
}
+
+ &__loading {
+ display: flex;
+ margin-left: 8px;
+ gap: 8px;
+ }
}
@keyframes breathing {
diff --git a/lib/uploader.ts b/lib/uploader.ts
index 310c77e3..78298fee 100644
--- a/lib/uploader.ts
+++ b/lib/uploader.ts
@@ -7,7 +7,14 @@ import type { WebDAVClient } from 'webdav'
import type { IDirectory } from './utils/fileTree'
import { getCurrentUser } from '@nextcloud/auth'
-import { FileType, Folder, Permission, davGetClient, davRemoteURL, davRootPath } from '@nextcloud/files'
+import {
+ davGetClient,
+ davRemoteURL,
+ davRootPath,
+ FileType,
+ Folder,
+ Permission,
+} from '@nextcloud/files'
import { encodePath } from '@nextcloud/paths'
import { normalize } from 'path'
@@ -510,6 +517,7 @@ export class Uploader {
try {
// Once all chunks are sent, assemble the final file
await Promise.all(chunksQueue)
+ upload.status = UploadStatus.ASSEMBLING
this.updateStats()
upload.response = await axios.request({
@@ -523,8 +531,8 @@ export class Uploader {
},
})
- this.updateStats()
upload.status = UploadStatus.FINISHED
+ this.updateStats()
logger.debug(`Successfully uploaded ${file.name}`, { file, upload })
resolve(upload)
} catch (error) {
@@ -570,6 +578,7 @@ export class Uploader {
// Update progress
upload.uploaded = upload.size
+ upload.status = UploadStatus.FINISHED
this.updateStats()
// Resolve