chore: Check file size before loading

pull/1388/merge
krille-chan 3 months ago
parent b6808535ab
commit 63d5d6e61f
No known key found for this signature in database

@ -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…
Cancel
Save