TF-2644 Handle total size exceeded maximum size when drag & drop multiple file to composer

This commit is contained in:
dab246
2024-03-01 17:09:09 +07:00
committed by Dat H. Pham
parent d646a5b9e4
commit 145a49d728
54 changed files with 1140 additions and 800 deletions
@@ -16,7 +16,6 @@ class DownloadImageAsBase64Interactor {
{
double? maxWidth,
bool? compress,
bool fromFileShared = false,
}
) async* {
try {
@@ -33,7 +32,6 @@ class DownloadImageAsBase64Interactor {
result!,
cid,
fileInfo,
fromFileShared: fromFileShared
));
} else {
yield Left<Failure, Success>(DownloadImageAsBase64Failure(null));
@@ -15,8 +15,6 @@ class UploadAttachmentInteractor {
FileInfo fileInfo,
Uri uploadUri, {
CancelToken? cancelToken,
bool isInline = false,
bool fromFileShared = false,
}) async* {
try {
final uploadAttachment = await _composerRepository.uploadAttachment(
@@ -24,17 +22,9 @@ class UploadAttachmentInteractor {
uploadUri,
cancelToken: cancelToken
);
yield Right<Failure, Success>(UploadAttachmentSuccess(
uploadAttachment,
isInline: isInline,
fromFileShared: fromFileShared
));
yield Right<Failure, Success>(UploadAttachmentSuccess(uploadAttachment));
} catch (e) {
yield Left<Failure, Success>(UploadAttachmentFailure(
e,
isInline: isInline,
fromFileShared: fromFileShared
));
yield Left<Failure, Success>(UploadAttachmentFailure(e, fileInfo));
}
}
}