Fix E2EE files
This commit is contained in:
parent
9405e5e6ff
commit
2712794cc0
3 changed files with 53 additions and 61 deletions
15
lib/utils/matrix_file_extension.dart
Normal file
15
lib/utils/matrix_file_extension.dart
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
import 'dart:io';
|
||||
|
||||
import 'package:famedlysdk/famedlysdk.dart';
|
||||
import 'package:open_file/open_file.dart';
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
|
||||
extension MatrixFileExtension on MatrixFile {
|
||||
void open() async {
|
||||
Directory tempDir = await getTemporaryDirectory();
|
||||
final file = File(tempDir.path + "/" + path.split("/").last);
|
||||
file.writeAsBytesSync(bytes);
|
||||
await OpenFile.open(file.path);
|
||||
return;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue