Paste to add attachment

This commit is contained in:
2024-11-22 00:28:29 +08:00
parent b52811d66e
commit 1af90cd9e7
14 changed files with 132 additions and 12 deletions

View File

@ -86,7 +86,10 @@ class PostWriteMedia {
if (file != null) {
return file!;
} else if (raw != null) {
return XFile.fromData(raw!, name: name);
return XFile.fromData(
raw!,
name: name,
);
}
return null;
}
@ -256,6 +259,9 @@ class PostWriteController extends ChangeNotifier {
media.name,
'interactive',
null,
mimetype: media.raw != null && media.type == PostWriteMediaType.image
? 'image/png'
: null,
);
final item = await attach.chunkedUploadParts(