fix: Android download
This commit is contained in:
parent
c5f084db87
commit
ce9d2275a3
1 changed files with 3 additions and 1 deletions
|
|
@ -15,7 +15,9 @@ extension MatrixFileExtension on MatrixFile {
|
|||
final fileName = name.split('/').last;
|
||||
if (PlatformInfos.isMobile) {
|
||||
final tmpDirectory = PlatformInfos.isAndroid
|
||||
? Directory('/storage/emulated/0/Download/')
|
||||
? (await getExternalStorageDirectories(
|
||||
type: StorageDirectory.downloads))
|
||||
.first
|
||||
: await getTemporaryDirectory();
|
||||
final path = '${tmpDirectory.path}$fileName';
|
||||
await File(path).writeAsBytes(bytes);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue