mirror of
https://github.com/Xevion/paperless-mobile.git
synced 2025-12-09 10:08:00 -06:00
Download to the public Downloads folder.
Removed ununsed permissions.
This commit is contained in:
@@ -58,9 +58,16 @@ class FileService {
|
||||
|
||||
static Future<Directory> get downloadsDirectory async {
|
||||
if (Platform.isAndroid) {
|
||||
return (await getExternalStorageDirectories(
|
||||
type: StorageDirectory.downloads))!
|
||||
.first;
|
||||
Directory? directory;
|
||||
directory = Directory('/storage/emulated/0/Download');
|
||||
// Try the default global folder, if it exists
|
||||
if (!await directory.exists()) {
|
||||
directory = (await getExternalStorageDirectories(
|
||||
type: StorageDirectory.downloads,
|
||||
))!
|
||||
.first;
|
||||
}
|
||||
return directory;
|
||||
} else if (Platform.isIOS) {
|
||||
return getApplicationDocumentsDirectory();
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user