Skip to content

armgit / ente

Public Imported from GitHub
0

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

[mob] Rethrow exception due to content size

Neeraj Gupta5820d03bb5b4
diff --git a/mobile/lib/utils/file_uploader.dart b/mobile/lib/utils/file_uploader.dart
index 0b3ee1c4bc..65940ce502 100644
--- a/mobile/lib/utils/file_uploader.dart
+++ b/mobile/lib/utils/file_uploader.dart
@@ -1297,16 +1297,8 @@ class FileUploader {
return uploadURL.objectKey;
} on DioError catch (e) {
- if (e.message.startsWith(
- "HttpException: Content size exceeds specified contentLength.",
- ) &&
- attempt == 1) {
- return _putFile(
- uploadURL,
- file,
- contentLength: (await file.readAsBytes()).length,
- attempt: 2,
- );
+ if (e.message.startsWith("HttpException: Content size")) {
+ rethrow;
} else if (attempt < kMaximumUploadAttempts) {
final newUploadURL = await _getUploadURL();
return _putFile(