Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

aic

Manav Rathi73292a5405a0
diff --git a/web/apps/photos/src/services/upload/uploadManager.ts b/web/apps/photos/src/services/upload/uploadManager.ts
index 4f8486f933..69487ee0d9 100644
--- a/web/apps/photos/src/services/upload/uploadManager.ts
+++ b/web/apps/photos/src/services/upload/uploadManager.ts
@@ -401,9 +401,7 @@ class UploadManager {
mediaFiles as ClusterableFile[],
);
- if (uploadCancelService.isUploadCancelationRequested()) {
- throw Error(CustomError.UPLOAD_CANCELLED);
- }
+ this.abortIfCancelled();
this.uiService.setFilenames(
new Map<number, string>(
@@ -531,9 +529,8 @@ class UploadManager {
const uiService = this.uiService;
while (this.filesToBeUploaded.length > 0) {
- if (uploadCancelService.isUploadCancelationRequested()) {
- throw Error(CustomError.UPLOAD_CANCELLED);
- }
+ this.abortIfCancelled();
+
let fileWithCollection = this.filesToBeUploaded.pop();
const { collectionID } = fileWithCollection;
const collection = this.collections.get(collectionID);