Move upload caps into validation config env vars.

Replace MAX_IMAGES_PER_UPLOAD with VALIDATION_UPLOAD_* limits mirrored on the frontend VITE_* names.
This commit is contained in:
2026-10-07 00:36:10 +02:00
parent 1f47cf051f
commit 493843cc42
6 changed files with 29 additions and 9 deletions
+12 -6
View File
@@ -45,12 +45,6 @@ class EnvironmentVariables {
@IsString()
CORS_ORIGINS: string;
@IsNotEmpty()
@IsNumber()
@Min(1)
@Max(100)
MAX_IMAGES_PER_UPLOAD: number;
@IsNotEmpty()
@IsNumber()
@Min(1)
@@ -100,6 +94,18 @@ class EnvironmentVariables {
@Min(1)
@Max(10_000)
THROTTLE_UPLOAD_LIMIT: number;
@IsNotEmpty()
@IsNumber()
@Min(1)
@Max(100)
VALIDATION_UPLOAD_MAX_IMAGES_PER_UPLOAD: number;
@IsNotEmpty()
@IsNumber()
@Min(1)
@Max(10_000_000)
VALIDATION_UPLOAD_MAX_VIEWS_MAX: number;
}
export const validate = (config: Record<string, unknown>) => {