Skip to content

armgit / ente

Public Imported from GitHub
0

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

Fail upload on dupes

Manav Rathi3298d97bbc38
diff --git a/web/apps/photos/src/services/upload/upload-service.ts b/web/apps/photos/src/services/upload/upload-service.ts
index d94e3a3d60..8ac05f316f 100644
--- a/web/apps/photos/src/services/upload/upload-service.ts
+++ b/web/apps/photos/src/services/upload/upload-service.ts
@@ -136,6 +136,7 @@ class UploadService {
async getUploadURL() {
if (this.uploadURLs.length === 0 && this.pendingUploadCount) {
await this.refillUploadURLs();
+ this.ensureUniqueUploadURLs();
}
return this.uploadURLs.pop();
}
@@ -148,6 +149,7 @@ class UploadService {
log.error("prefetch uploadURL failed", e);
handleUploadError(e);
}
+ this.ensureUniqueUploadURLs();
}
async uploadFile(uploadFile: UploadFile) {
@@ -171,7 +173,9 @@ class UploadService {
} finally {
this.activeUploadURLRefill = undefined;
}
+ }
+ private ensureUniqueUploadURLs() {
// TODO: Sanity check added on new implementation Nov 2024, remove after
// a while (tag: Migration).
if (