fix: download path for saving files

This commit is contained in:
Jayesh Nirve 2021-11-09 22:01:23 +05:30
parent bda4727490
commit 967f64247e
No known key found for this signature in database
GPG Key ID: E9F26B1FCEB549BD

View File

@ -15,7 +15,7 @@ extension MatrixFileExtension on MatrixFile {
final fileName = name.split('/').last;
if (PlatformInfos.isMobile) {
final tmpDirectory = PlatformInfos.isAndroid
? Directory('/storage/emulated/0/Download')
? Directory('/storage/emulated/0/Download/')
: await getTemporaryDirectory();
final path = '${tmpDirectory.path}$fileName';
await File(path).writeAsBytes(bytes);