[BUG] Fix upload attachment

This commit is contained in:
dab246
2021-10-22 18:48:53 +07:00
committed by Dat H. Pham
parent 4b0de28faf
commit 016b06be7f
3 changed files with 16 additions and 2 deletions
+3
View File
@@ -1,5 +1,6 @@
import 'package:equatable/equatable.dart';
import 'package:mime/mime.dart';
class FileInfo with EquatableMixin {
final String fileName;
@@ -12,6 +13,8 @@ class FileInfo with EquatableMixin {
return FileInfo('', '', 0);
}
String get mimeType => lookupMimeType(filePath) ?? 'application/json; charset=UTF-8';
@override
List<Object> get props => [fileName, filePath, fileSize];
}
+3
View File
@@ -57,6 +57,9 @@ dependencies:
# http_parser
http_parser: 4.0.0
# mime
mime: 1.0.1
dev_dependencies:
flutter_test:
sdk: flutter