π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Simplify
Neeraj Guptae30aa6f6b64d
diff --git a/mobile/apps/photos/lib/utils/file_uploader.dart b/mobile/apps/photos/lib/utils/file_uploader.dartindex 77fb9007a3..8976ff0598 100644--- a/mobile/apps/photos/lib/utils/file_uploader.dart+++ b/mobile/apps/photos/lib/utils/file_uploader.dart@@ -1461,33 +1461,15 @@ class FileUploader {_usedUploadURLs.putIfAbsent(uploadURL.url, () => now);if (existingTimestamp != now) {- _logger.severe(- "CRITICAL: Duplicate upload URL detected! "- "First used: $existingTimestamp, Duplicate attempt: $now",- );throw DuplicateUploadURLError(firstUsedAt: existingTimestamp,duplicateUsedAt: now,);}-// Clean up old entries to prevent memory growth (only when > 5000 entries)if (_usedUploadURLs.length > 5000) {final oneHourAgo = now.subtract(const Duration(hours: 1));_usedUploadURLs.removeWhere((key, value) => value.isBefore(oneHourAgo));-- // Size-based fallback if time-based cleanup didn't reduce size enough- if (_usedUploadURLs.length > 5000) {- final entries = _usedUploadURLs.entries.toList()- ..sort((a, b) => a.value.compareTo(b.value));- final toRemove = entries.take(_usedUploadURLs.length - 4000);- for (final entry in toRemove) {- _usedUploadURLs.remove(entry.key);- }- _logger.warning(- "Forcibly removed ${toRemove.length} oldest upload URLs to prevent unbounded growth",- );- }_logger.info("Cleaned up used upload URLs, remaining: ${_usedUploadURLs.length}",);diff --git a/mobile/apps/photos/scripts/internal_changes.txt b/mobile/apps/photos/scripts/internal_changes.txtindex ac60591c9a..0b11d8b40d 100644--- a/mobile/apps/photos/scripts/internal_changes.txt+++ b/mobile/apps/photos/scripts/internal_changes.txt@@ -1,3 +1,4 @@+- Neeraj: Asserts for url reuse and plain vs enc size mismatch- Neeraj: Fix video aspect ratio when shared from external apps- Prateek: Add logging for background task execution- Prateek: (i) Add detailed debug logging for upload preparation, pre-upload checks, file queueing, and upload progress tracking