TF-2644 Handle total size exceeded maximum size when drag & drop multiple file to composer
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user