1
0
mirror of https://github.com/bitwarden/browser.git synced 2025-03-02 03:41:09 +01:00

Check file size client side (#313)

This commit is contained in:
Matt Gibson 2021-03-29 08:17:42 -05:00 committed by GitHub
parent afac694e9a
commit d71bd092ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -270,6 +270,11 @@ export class AddEditComponent implements OnInit {
}
file = files[0];
if (files[0].size > 524288000) { // 500 MB
this.platformUtilsService.showToast('error', this.i18nService.t('errorOccurred'),
this.i18nService.t('maxFileSize'));
return;
}
}
if (!this.editMode) {