TF-56 Send email with attachment

This commit is contained in:
dab246
2021-09-20 09:25:00 +07:00
committed by Dat H. Pham
parent a3b0ae0d53
commit 449b512986
29 changed files with 176 additions and 133 deletions
+2 -3
View File
@@ -8,10 +8,9 @@ class UploadRequest with EquatableMixin {
final Uri uploadUrl;
final FileInfo fileInfo;
final AccountId accountId;
final AccountRequest accountRequest;
UploadRequest(this.uploadUrl, this.accountId, this.fileInfo, this.accountRequest);
UploadRequest(this.uploadUrl, this.accountId, this.fileInfo);
@override
List<Object?> get props => [uploadUrl, accountId, fileInfo, accountRequest];
List<Object?> get props => [uploadUrl, accountId, fileInfo];
}
+2 -2
View File
@@ -34,7 +34,7 @@ class UploadResponse with EquatableMixin {
}
extension UploadResponseExtension on UploadResponse {
Attachment toAttachmentFile(String nameFile) {
return Attachment(blobId: blobId, size: UnsignedInt(size), name: nameFile, type: type);
Attachment toAttachmentFile(String nameFile, {MediaType? mediaType}) {
return Attachment(blobId: blobId, size: UnsignedInt(size), name: nameFile, type: mediaType ?? type);
}
}