From e2680d8704646ebfd8fe6d2c5a4c36b63fdd74a6 Mon Sep 17 00:00:00 2001 From: Montassar Ghanmy Date: Thu, 27 Feb 2025 18:39:38 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20resuming=20upload=20when?= =?UTF-8?q?=20creating=20a=20new=20document=20(#832)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/app/features/files/services/file-upload-service.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tdrive/frontend/src/app/features/files/services/file-upload-service.ts b/tdrive/frontend/src/app/features/files/services/file-upload-service.ts index f393a962..cc2a54c2 100644 --- a/tdrive/frontend/src/app/features/files/services/file-upload-service.ts +++ b/tdrive/frontend/src/app/features/files/services/file-upload-service.ts @@ -305,6 +305,12 @@ class FileUploadService { callback?: (file: { root: string; file: FileType | null }, context: any) => void; }, ): Promise { + + // reset the upload status when creating a new document + if (fileList.length === 1 && fileList[0].root === fileList[0].file.name) { + this.pauseOrResume(); + } + // if we're uploading one file directly, do the size calc first for (const file of fileList) { if (file.root && file.file?.name && file.root === file.file.name) {