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
@@ -5,7 +5,6 @@ import 'dart:io';
import 'package:core/core.dart';
import 'package:dio/dio.dart';
import 'package:model/model.dart';
import 'package:tmail_ui_user/main/utils/app_logger.dart';
class ComposerAPI {
@@ -14,7 +13,6 @@ class ComposerAPI {
ComposerAPI(this._dioClient);
Future<UploadResponse> uploadAttachment(UploadRequest uploadRequest) async {
log('uploadAttachment: fileInfo: ${uploadRequest.fileInfo.props}');
final headerParam = _dioClient.getHeaders();
headerParam[HttpHeaders.contentTypeHeader] = uploadRequest.fileInfo.mimeType;
headerParam[HttpHeaders.contentLengthHeader] = uploadRequest.fileInfo.fileSize;