TF-1323 Fix can not attach image on mobile and web
This commit is contained in:
@@ -51,6 +51,7 @@ import 'package:tmail_ui_user/features/upload/presentation/controller/upload_con
|
||||
import 'package:tmail_ui_user/main/bindings/network/binding_tag.dart';
|
||||
import 'package:tmail_ui_user/main/exceptions/cache_exception_thrower.dart';
|
||||
import 'package:tmail_ui_user/main/exceptions/remote_exception_thrower.dart';
|
||||
import 'package:uuid/uuid.dart';
|
||||
import 'package:worker_manager/worker_manager.dart';
|
||||
|
||||
class ComposerBindings extends BaseBindings {
|
||||
@@ -67,7 +68,11 @@ class ComposerBindings extends BaseBindings {
|
||||
|
||||
@override
|
||||
void bindingsDataSourceImpl() {
|
||||
Get.lazyPut(() => AttachmentUploadDataSourceImpl(Get.find<FileUploader>()));
|
||||
Get.lazyPut(() => AttachmentUploadDataSourceImpl(
|
||||
Get.find<FileUploader>(),
|
||||
Get.find<Uuid>(),
|
||||
Get.find<RemoteExceptionThrower>()
|
||||
));
|
||||
Get.lazyPut(() => ComposerDataSourceImpl(Get.find<DownloadClient>(), Get.find<RemoteExceptionThrower>()));
|
||||
Get.lazyPut(() => ContactDataSourceImpl(Get.find<CacheExceptionThrower>()));
|
||||
Get.lazyPut(() => MailboxDataSourceImpl(
|
||||
|
||||
@@ -1445,7 +1445,7 @@ class ComposerController extends BaseController {
|
||||
final accountId = mailboxDashBoardController.accountId.value;
|
||||
if (session != null && accountId != null) {
|
||||
final uploadUri = session.getUploadUri(accountId);
|
||||
uploadController.uploadInlineImage(pickedFile, uploadUri);
|
||||
uploadController.uploadFileAction(pickedFile, uploadUri, isInline: true);
|
||||
}
|
||||
} else {
|
||||
if (currentContext != null) {
|
||||
|
||||
Reference in New Issue
Block a user