chore: Check file size before loading
This commit is contained in:
parent
b6808535ab
commit
63d5d6e61f
1 changed files with 3 additions and 0 deletions
|
|
@ -66,6 +66,9 @@ class SendFileDialogState extends State<SendFileDialog> {
|
|||
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(),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue