From 733fe6b3d8e66c6147a3b3c66c74514c75383cd3 Mon Sep 17 00:00:00 2001 From: Neeraj Gupta <254676+ua741@users.noreply.github.com> Date: Sat, 20 Apr 2024 17:31:42 +0530 Subject: [PATCH] [mob][photos] Restrict multipart upload to debug builds --- mobile/lib/utils/file_uploader.dart | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mobile/lib/utils/file_uploader.dart b/mobile/lib/utils/file_uploader.dart index adf5847f39..ec77b035a6 100644 --- a/mobile/lib/utils/file_uploader.dart +++ b/mobile/lib/utils/file_uploader.dart @@ -29,7 +29,6 @@ import "package:photos/models/metadata/file_magic.dart"; import 'package:photos/models/upload_url.dart'; import "package:photos/models/user_details.dart"; import 'package:photos/services/collections_service.dart'; -import "package:photos/services/feature_flag_service.dart"; import "package:photos/services/file_magic_service.dart"; import 'package:photos/services/local_sync_service.dart'; import 'package:photos/services/sync_service.dart'; @@ -497,7 +496,7 @@ class FileUploader { // Calculate the number of parts for the file. Multiple part upload // is only enabled for internal users and debug builds till it's battle tested. - final count = FeatureFlagService.instance.isInternalUserOrDebugBuild() + final count = kDebugMode ? await calculatePartCount( await encryptedFile.length(), )