mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-12-11 06:19:28 +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);
|
||||
await OpenFile.open(file.path);
|
||||
} 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);
|
||||
file.writeAsBytesSync(bytes);
|
||||
System.invoke('xdg-open $filePath');
|
||||
|
Loading…
Reference in New Issue
Block a user