fix: Added file size fix

This commit is contained in:
Deven Joshi
2021-01-20 17:34:57 +05:30
parent d48ccf15df
commit 0e857a8938
@@ -1998,7 +1998,7 @@ class MessageInputState extends State<MessageInput> {
_attachments.add(attachment); _attachments.add(attachment);
}); });
if (file.size > _kMaxAttachmentSize) { if (file.size / 1024 > _kMaxAttachmentSize) {
if (attachmentType == 'video') { if (attachmentType == 'video') {
final mediaInfo = await CompressVideoService.compressVideo(file.path); final mediaInfo = await CompressVideoService.compressVideo(file.path);
file = PlatformFile( file = PlatformFile(