TF-296 Fix download file on browser

This commit is contained in:
dab246
2022-03-03 13:54:23 +07:00
committed by Dat H. Pham
parent a24a4a2bfd
commit 7beebfebc8
19 changed files with 221 additions and 32 deletions
@@ -202,6 +202,19 @@ class EmailAPI {
cancelToken: cancelToken);
}
Future<bool> downloadAttachmentForWeb(
Attachment attachment,
AccountId accountId,
String baseDownloadUrl,
AccountRequest accountRequest,
) async {
return _downloadManager.downloadFileForWeb(
attachment.getDownloadUrl(baseDownloadUrl, accountId),
attachment.name ?? '',
accountRequest.basicAuth,
);
}
Future<List<EmailId>> moveToMailbox(AccountId accountId, MoveRequest moveRequest) async {
final setEmailMethod = SetEmailMethod(accountId)
..addUpdates(moveRequest.emailIds