HyM attachments resolve: #2 #3

Merged
Juan merged 15 commits from login into main 2025-04-24 16:52:58 +00:00
Showing only changes of commit f132ae69c1 - Show all commits

View File

@ -0,0 +1,14 @@
import 'dart:html' as html;
import 'dart:io';
import 'structs.dart';
import 'package:file_saver/file_saver.dart';
class Attachmentdownload {
Future<void> saveFile(AttachmentResponse attachment) async {
await FileSaver.instance.saveFile(
name: attachment.name.toString().substring(0, attachment.name.toString().lastIndexOf('.')),
bytes: attachment.data,
ext: attachment.name.toString().substring(attachment.name.toString().lastIndexOf('.')+1)
);
}
}