mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-12-03 17:59:45 +01:00
Correct file download
This commit is contained in:
parent
f51123150d
commit
4764af7300
@ -31,7 +31,11 @@ extension MatrixFileExtension on MatrixFile {
|
|||||||
file.writeAsBytesSync(bytes);
|
file.writeAsBytesSync(bytes);
|
||||||
await OpenFile.open(file.path);
|
await OpenFile.open(file.path);
|
||||||
} else if (Platform.isLinux) {
|
} else if (Platform.isLinux) {
|
||||||
final filePath = "/home/krille/Downloads/";
|
final directory = Directory('Downloads');
|
||||||
|
if (await directory.exists() == false) {
|
||||||
|
await directory.create();
|
||||||
|
}
|
||||||
|
final filePath = "${directory.path}/";
|
||||||
final file = File(filePath + path.split("/").last);
|
final file = File(filePath + path.split("/").last);
|
||||||
file.writeAsBytesSync(bytes);
|
file.writeAsBytesSync(bytes);
|
||||||
System.invoke('xdg-open $filePath');
|
System.invoke('xdg-open $filePath');
|
||||||
|
Loading…
Reference in New Issue
Block a user