mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-08 13:09:30 +01:00
Merge branch 'krille/fix-filenames' into 'main'
chore: Follow up fix filenames See merge request famedly/fluffychat!700
This commit is contained in:
commit
ded70a7fce
@ -68,8 +68,8 @@ class _AudioPlayerState extends State<AudioPlayerWidget> {
|
|||||||
if (matrixFile == null) throw ('Download failed');
|
if (matrixFile == null) throw ('Download failed');
|
||||||
final tempDir = await getTemporaryDirectory();
|
final tempDir = await getTemporaryDirectory();
|
||||||
final fileName = Uri.encodeComponent(
|
final fileName = Uri.encodeComponent(
|
||||||
widget.event.attachmentOrThumbnailMxcUrl()!.toString());
|
widget.event.attachmentOrThumbnailMxcUrl()!.pathSegments.last);
|
||||||
final file = File('${tempDir.path}/$fileName');
|
final file = File('${tempDir.path}/${fileName}_${matrixFile.name}');
|
||||||
await file.writeAsBytes(matrixFile.bytes);
|
await file.writeAsBytes(matrixFile.bytes);
|
||||||
|
|
||||||
setState(() {
|
setState(() {
|
||||||
|
@ -42,8 +42,8 @@ class _EventVideoPlayerState extends State<EventVideoPlayer> {
|
|||||||
} else {
|
} else {
|
||||||
final tempDir = await getTemporaryDirectory();
|
final tempDir = await getTemporaryDirectory();
|
||||||
final fileName = Uri.encodeComponent(
|
final fileName = Uri.encodeComponent(
|
||||||
widget.event.attachmentOrThumbnailMxcUrl()!.toString());
|
widget.event.attachmentOrThumbnailMxcUrl()!.pathSegments.last);
|
||||||
final file = File('${tempDir.path}/$fileName');
|
final file = File('${tempDir.path}/${fileName}_${videoFile.name}');
|
||||||
if (await file.exists() == false) {
|
if (await file.exists() == false) {
|
||||||
await file.writeAsBytes(videoFile.bytes);
|
await file.writeAsBytes(videoFile.bytes);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user