Skip to content

armgit / ente

Public Imported from GitHub
0

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

Remove constraint of type of files that can be downloaded

ashilknfa855cd4a6a1
diff --git a/mobile/apps/locker/lib/utils/file_util.dart b/mobile/apps/locker/lib/utils/file_util.dart
index f8c7be1716..711ace53d6 100644
--- a/mobile/apps/locker/lib/utils/file_util.dart
+++ b/mobile/apps/locker/lib/utils/file_util.dart
@@ -153,10 +153,6 @@ class FileUtil {
continue;
}
- if (!_isSupportedExtension(extension)) {
- throw UnsupportedError('Unsupported file type for download');
- }
-
final targetFileName =
extension.isEmpty ? baseName : "$baseName.$extension";
@@ -465,20 +461,4 @@ class FileUtil {
);
}
}
-
- static bool _isSupportedExtension(String extension) {
- const supported = <String>{
- 'png',
- 'jpg',
- 'jpeg',
- 'gif',
- 'heic',
- 'heif',
- 'webp',
- 'svg',
- 'pdf',
- 'txt',
- };
- return supported.contains(extension.toLowerCase());
- }
}