mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-12-23 22:12:34 +01:00
chore: Follow up file download type fix
This commit is contained in:
parent
99595caee5
commit
9bed679568
@ -1,3 +1,5 @@
|
||||
import 'dart:developer';
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
@ -22,6 +24,7 @@ extension LocalizedBody on Event {
|
||||
|
||||
void shareFile(BuildContext context) async {
|
||||
final matrixFile = await _getFile(context);
|
||||
inspect(matrixFile);
|
||||
|
||||
matrixFile.result?.share(context);
|
||||
}
|
||||
|
@ -73,7 +73,7 @@ extension MatrixFileExtension on MatrixFile {
|
||||
href: html.Url.createObjectUrlFromBlob(
|
||||
html.Blob(
|
||||
[bytes],
|
||||
'application/octet-stream',
|
||||
mimeType,
|
||||
),
|
||||
),
|
||||
)
|
||||
@ -87,7 +87,7 @@ extension MatrixFileExtension on MatrixFile {
|
||||
final box = context.findRenderObject() as RenderBox?;
|
||||
|
||||
await Share.shareXFiles(
|
||||
[XFile.fromData(bytes)],
|
||||
[XFile.fromData(bytes, name: name, mimeType: mimeType)],
|
||||
sharePositionOrigin:
|
||||
box == null ? null : box.localToGlobal(Offset.zero) & box.size,
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user