mirror of
https://github.com/aliasvault/aliasvault.git
synced 2026-05-09 07:46:13 -04:00
Update AliasVault.Client client-side local import filesize limit for 50MB to 1GB (#1786)
This commit is contained in:
committed by
Leendert de Borst
parent
3577b00280
commit
c8e1626967
@@ -1044,11 +1044,15 @@
|
||||
IsImporting = true;
|
||||
StateHasChanged();
|
||||
|
||||
// Limit file size to 50MB (increased for binary files with attachments)
|
||||
var maxFileSize = 50 * 1024 * 1024;
|
||||
// Limit file size fixed in code to 1024MB.
|
||||
// This is a browser-memory safety ceiling, not a server/infra limit. The file
|
||||
// is parsed entirely client-side and never uploaded. Server upload limits for the
|
||||
// resulting vault sync are controlled separately via the MAX_UPLOAD_SIZE_MB env var.
|
||||
const int maxFileSizeMb = 1024;
|
||||
var maxFileSize = maxFileSizeMb * 1024 * 1024;
|
||||
if (e.File.Size > maxFileSize)
|
||||
{
|
||||
ImportError = Localizer["ImportErrorFileTooLarge"];
|
||||
ImportError = Localizer["ImportErrorFileTooLarge", maxFileSizeMb];
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -167,8 +167,8 @@
|
||||
<comment>Error message when user selects an unsupported file format. {0} is the list of supported extensions</comment>
|
||||
</data>
|
||||
<data name="ImportErrorFileTooLarge" xml:space="preserve">
|
||||
<value>File size exceeds 10MB limit.</value>
|
||||
<comment>Error message when file is too large</comment>
|
||||
<value>File size exceeds {0}MB limit.</value>
|
||||
<comment>Error message when file is too large. {0} is the maximum allowed size in megabytes</comment>
|
||||
</data>
|
||||
<data name="EncryptedFilePasswordPrompt" xml:space="preserve">
|
||||
<value>This file is encrypted. Please enter the password you used when creating the export.</value>
|
||||
|
||||
Reference in New Issue
Block a user