π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
fix: only multipart when count is greater than 1
Prateek Sunal2b9db5cbfbcf
diff --git a/mobile/lib/utils/file_uploader.dart b/mobile/lib/utils/file_uploader.dartindex df3e54aeca..c60ef3e861 100644--- a/mobile/lib/utils/file_uploader.dart+++ b/mobile/lib/utils/file_uploader.dart@@ -497,13 +497,16 @@ class FileUploader {await encryptedFile.length(),);- final fileUploadURLs = await getMultipartUploadURLs(count);- final fileObjectKey = fileUploadURLs.objectKey;+ String fileObjectKey;- await putMultipartFile(fileUploadURLs, encryptedFile);+ if (count <= 1) {+ final fileUploadURL = await _getUploadURL();+ fileObjectKey = await _putFile(fileUploadURL, encryptedFile);+ } else {+ final fileUploadURLs = await getMultipartUploadURLs(count);+ fileObjectKey = await putMultipartFile(fileUploadURLs, encryptedFile);+ }- // final fileUploadURL = await _getUploadURL();- // fileObjectKey = await _putFile(fileUploadURL, encryptedFile);final metadata = await file.getMetadataForUpload(mediaUploadData);final encryptedMetadataResult = await CryptoUtil.encryptChaCha(utf8.encode(jsonEncode(metadata)) as Uint8List,