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