From c8e1626967272bc3ec0860e41f6ef884da5903f4 Mon Sep 17 00:00:00 2001 From: Leendert de Borst Date: Fri, 24 Apr 2026 15:03:59 +0200 Subject: [PATCH] Update AliasVault.Client client-side local import filesize limit for 50MB to 1GB (#1786) --- .../ImportExport/Components/ImportServiceCard.razor | 10 +++++++--- .../Settings/ImportExport/ImportServiceCard.en.resx | 4 ++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/apps/server/AliasVault.Client/Main/Pages/Settings/ImportExport/Components/ImportServiceCard.razor b/apps/server/AliasVault.Client/Main/Pages/Settings/ImportExport/Components/ImportServiceCard.razor index 2eeb1c81a..f690517de 100644 --- a/apps/server/AliasVault.Client/Main/Pages/Settings/ImportExport/Components/ImportServiceCard.razor +++ b/apps/server/AliasVault.Client/Main/Pages/Settings/ImportExport/Components/ImportServiceCard.razor @@ -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; } diff --git a/apps/server/AliasVault.Client/Resources/Components/Main/Settings/ImportExport/ImportServiceCard.en.resx b/apps/server/AliasVault.Client/Resources/Components/Main/Settings/ImportExport/ImportServiceCard.en.resx index 07ad8efac..d3d3a0059 100644 --- a/apps/server/AliasVault.Client/Resources/Components/Main/Settings/ImportExport/ImportServiceCard.en.resx +++ b/apps/server/AliasVault.Client/Resources/Components/Main/Settings/ImportExport/ImportServiceCard.en.resx @@ -167,8 +167,8 @@ Error message when user selects an unsupported file format. {0} is the list of supported extensions - File size exceeds 10MB limit. - Error message when file is too large + File size exceeds {0}MB limit. + Error message when file is too large. {0} is the maximum allowed size in megabytes This file is encrypted. Please enter the password you used when creating the export.