mirror of
https://github.com/krille-chan/fluffychat
synced 2024-09-10 06:25:15 +00:00
chore: Follow up file download type fix
This commit is contained in:
parent
3b130b6d00
commit
6a3c729a64
2 changed files with 5 additions and 2 deletions
|
@ -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 a new issue