1
0
mirror of https://github.com/bitwarden/mobile.git synced 2024-12-26 16:57:59 +01:00

Limit file upload sizes to 100MB (#1385)

both iOS and Android are having trouble with the current method
of loading the entire file to memory, encrypting it, and sending
to azure in one go.

We will need to come up with a chunking scheme to support
larger files in the future
This commit is contained in:
Matt Gibson 2021-04-27 15:14:54 -05:00 committed by GitHub
parent 2fbd3b4538
commit 3ef5ca9cc0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -356,7 +356,7 @@ namespace Bit.App.Pages
AppResources.AnErrorHasOccurred); AppResources.AnErrorHasOccurred);
return false; return false;
} }
if (FileData.Length > 524288000) // 500 MB if (FileData.Length > 104857600) // 100 MB
{ {
await _platformUtilsService.ShowDialogAsync(AppResources.MaxFileSize, await _platformUtilsService.ShowDialogAsync(AppResources.MaxFileSize,
AppResources.AnErrorHasOccurred); AppResources.AnErrorHasOccurred);

View File

@ -102,7 +102,7 @@ namespace Bit.App.Pages
AppResources.AnErrorHasOccurred); AppResources.AnErrorHasOccurred);
return false; return false;
} }
if (FileData.Length > 524288000) // 500 MB if (FileData.Length > 104857600) // 100 MB
{ {
await _platformUtilsService.ShowDialogAsync(AppResources.MaxFileSize, await _platformUtilsService.ShowDialogAsync(AppResources.MaxFileSize,
AppResources.AnErrorHasOccurred); AppResources.AnErrorHasOccurred);

View File

@ -926,7 +926,7 @@
<value>Feature Unavailable</value> <value>Feature Unavailable</value>
</data> </data>
<data name="MaxFileSize" xml:space="preserve"> <data name="MaxFileSize" xml:space="preserve">
<value>Maximum file size is 500 MB.</value> <value>Maximum file size is 100 MB.</value>
</data> </data>
<data name="UpdateKey" xml:space="preserve"> <data name="UpdateKey" xml:space="preserve">
<value>You cannot use this feature until you update your encryption key.</value> <value>You cannot use this feature until you update your encryption key.</value>