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
@@ -0,0 +1,19 @@
import 'dart:io';
import 'package:model/upload/file_info.dart';
extension FileExtension on File {
FileInfo toFileInfo({
bool? isInline,
bool? isShared
}) {
return FileInfo(
fileName: path.split('/').last,
fileSize: existsSync() ? lengthSync() : 0,
filePath: path,
isInline: isInline,
isShared: isShared
);
}
}