⬆️ Support latest Paperclip

This commit is contained in:
2024-07-29 18:06:38 +08:00
parent 3db6850d89
commit 8ab3ca5633
4 changed files with 11 additions and 97 deletions

View File

@ -86,15 +86,11 @@ class _PersonalizeScreenState extends State<PersonalizeScreen> {
Response? attachResp;
try {
final file = File(image.path);
final hash = await calculateFileSha256(file);
final meta = await calculateImageMetaFromFile(file);
attachResp = await provider.createAttachment(
await file.readAsBytes(),
file.path,
hash,
'p.$position',
{...meta},
null
);
} catch (e) {
setState(() => _isBusy = false);