mirror of
https://github.com/krille-chan/fluffychat
synced 2024-09-17 08:15:09 +00:00
chore: fix Video audio filename
This commit is contained in:
parent
9284b7d7ee
commit
8cdf0ed9fe
2 changed files with 2 additions and 2 deletions
|
@ -66,7 +66,7 @@ class _AudioPlayerState extends State<AudioPlayerWidget> {
|
||||||
await widget.event.downloadAndDecryptAttachmentCached();
|
await widget.event.downloadAndDecryptAttachmentCached();
|
||||||
if (matrixFile == null) throw ('Download failed');
|
if (matrixFile == null) throw ('Download failed');
|
||||||
final tempDir = await getTemporaryDirectory();
|
final tempDir = await getTemporaryDirectory();
|
||||||
final fileName = widget.event.infoMap['url'] as String;
|
final fileName = widget.event.content.tryGet<String>('url')!;
|
||||||
final file = File('${tempDir.path}/$fileName');
|
final file = File('${tempDir.path}/$fileName');
|
||||||
await file.writeAsBytes(matrixFile.bytes);
|
await file.writeAsBytes(matrixFile.bytes);
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@ class _EventVideoPlayerState extends State<EventVideoPlayer> {
|
||||||
_networkUri = html.Url.createObjectUrlFromBlob(blob);
|
_networkUri = html.Url.createObjectUrlFromBlob(blob);
|
||||||
} else {
|
} else {
|
||||||
final tempDir = await getTemporaryDirectory();
|
final tempDir = await getTemporaryDirectory();
|
||||||
final fileName = widget.event.infoMap['url'] as String;
|
final fileName = widget.event.content.tryGet<String>('url')!;
|
||||||
final file = File('${tempDir.path}/$fileName');
|
final file = File('${tempDir.path}/$fileName');
|
||||||
if (await file.exists() == false) {
|
if (await file.exists() == false) {
|
||||||
await file.writeAsBytes(videoFile.bytes);
|
await file.writeAsBytes(videoFile.bytes);
|
||||||
|
|
Loading…
Reference in a new issue