feat(upload): increase document upload size limits to 50MB across the application

This commit is contained in:
marshalyordanos
2026-08-11 09:26:23 +03:00
parent 577390ca6b
commit ea6eccbf09
9 changed files with 190 additions and 18 deletions

View File

@@ -16,11 +16,17 @@ import { AppModule } from "./app.module";
/**
* JSON body ceiling. Signing posts the signature AND the company stamp as
* base64 in one JSON body, and base64 inflates bytes by ~4/3 — a 10MB stamp is
* ~13.4MB on the wire. Express defaults to 100kb, which rejected any real stamp
* base64 in one JSON body, and base64 inflates bytes by ~4/3 — a 50MB asset is
* ~67MB on the wire. Express defaults to 100kb, which rejected any real stamp
* image with a 413 "request entity too large".
*
* Sized to clear the 50MB per-document ceiling
* (`DOCUMENT_UPLOAD_MAX_BYTES`) after base64 inflation, with room for the
* surrounding JSON. Note that the reverse proxy applies its own
* `client_max_body_size` and rejects oversized bodies before Nest sees them —
* raising this alone does not lift the limit end to end (see docs/uploads.md).
*/
const JSON_BODY_LIMIT = "20mb";
const JSON_BODY_LIMIT = "100mb";
/**
* Static /etc/hosts-style overrides from `DNS_HOST_OVERRIDES`, formatted as