From 5960efb61225dfac4e6c38a75a6fc33e29b618b2 Mon Sep 17 00:00:00 2001 From: sravan Date: Mon, 20 Jul 2026 16:06:19 +0530 Subject: [PATCH] uploads: support up to 1 GB attachments, streamed to disk (was 25 MB, buffered in memory) (batch145) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Server streams the upload body straight to /data/uploads (a .part temp file, atomic rename on success), backpressure-aware, so a 1 GB file never buffers in RAM. MAX_UPLOAD_MB env (default 1024 = 1 GB) controls the cap; error message reflects it. - Client size guard raised 25 MB -> 1 GB. - docker-compose documents MAX_UPLOAD_MB and the required Nginx Proxy Manager client_max_body_size. NOTE: the actual bottleneck for the user's 9.7 MB reject is almost certainly NPM's client_max_body_size (nginx default 1 MB) — that must be raised in the NPM admin; the app change alone can't lift it. Co-Authored-By: Claude Opus 4.8 --- docker-compose.yml | 5 +++++ server/public/home.html | 4 ++-- server/routes.js | 41 +++++++++++++++++++++++++++++------------ 3 files changed, 36 insertions(+), 14 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index e720c3b..3d36a86 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -17,6 +17,11 @@ services: # Chat uploads / recordings / transcripts on the persistent volume too, so they survive image # rebuilds (otherwise old shared images 404 as "broken image" after every deploy). - UPLOADS_DIR=/data/uploads + # Max chat-attachment size in MB (default 1024 = 1 GB). The app streams uploads to /data/uploads, so + # large files don't buffer in memory. IMPORTANT: also set Nginx Proxy Manager's client_max_body_size + # for remote.bizgaze.com to at least this (Advanced tab: `client_max_body_size 1024m;`) or the proxy + # rejects big uploads before they reach the app. + - MAX_UPLOAD_MB=1024 - REC_DIR=/data/recordings - TRANS_DIR=/data/transcripts # Secrets (TURN credentials, SSO_SECRET, BIZGAZE_WEBHOOK_URL, etc.) live in diff --git a/server/public/home.html b/server/public/home.html index fc3243e..6b4e684 100644 --- a/server/public/home.html +++ b/server/public/home.html @@ -1158,7 +1158,7 @@ -