mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-12-24 22:42:33 +01:00
Merge branch 'krille/fix-android-download' into 'main'
fix: Android download See merge request famedly/fluffychat!557
This commit is contained in:
commit
70432704fb
@ -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…
Reference in New Issue
Block a user