diff --git a/lib/pages/chat/send_file_dialog.dart b/lib/pages/chat/send_file_dialog.dart index f54f84d27..e027113a5 100644 --- a/lib/pages/chat/send_file_dialog.dart +++ b/lib/pages/chat/send_file_dialog.dart @@ -66,6 +66,9 @@ class SendFileDialogState extends State { scaffoldMessenger.showLoadingSnackBar(l10n.generatingVideoThumbnail); thumbnail = await xfile.getVideoThumbnail(); } else { + if (length > maxUploadSize) { + throw FileTooBigMatrixException(length, maxUploadSize); + } // Else we just create a MatrixFile file = MatrixFile( bytes: await xfile.readAsBytes(),