mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-12-18 10:52:34 +01:00
chore: Follow up fix uri encoding
This commit is contained in:
parent
e4ca34ddcc
commit
374cefaf64
lib/pages/chat/events
@ -67,7 +67,8 @@ class _AudioPlayerState extends State<AudioPlayerWidget> {
|
||||
await widget.event.downloadAndDecryptAttachmentCached();
|
||||
if (matrixFile == null) throw ('Download failed');
|
||||
final tempDir = await getTemporaryDirectory();
|
||||
final fileName = widget.event.attachmentOrThumbnailMxcUrl()!.toString();
|
||||
final fileName = Uri.encodeComponent(
|
||||
widget.event.attachmentOrThumbnailMxcUrl()!.toString());
|
||||
final file = File('${tempDir.path}/$fileName');
|
||||
await file.writeAsBytes(matrixFile.bytes);
|
||||
|
||||
|
@ -41,7 +41,8 @@ class _EventVideoPlayerState extends State<EventVideoPlayer> {
|
||||
_networkUri = html.Url.createObjectUrlFromBlob(blob);
|
||||
} else {
|
||||
final tempDir = await getTemporaryDirectory();
|
||||
final fileName = widget.event.attachmentOrThumbnailMxcUrl()!.toString();
|
||||
final fileName = Uri.encodeComponent(
|
||||
widget.event.attachmentOrThumbnailMxcUrl()!.toString());
|
||||
final file = File('${tempDir.path}/$fileName');
|
||||
if (await file.exists() == false) {
|
||||
await file.writeAsBytes(videoFile.bytes);
|
||||
|
Loading…
Reference in New Issue
Block a user