From ffd5d48c0dafb6b8e7abe0368d5a323794ca92c3 Mon Sep 17 00:00:00 2001 From: Giancarmine Salucci Date: Wed, 6 May 2026 19:32:28 +0200 Subject: [PATCH] fix: increase body size limit to 500MB for audio uploads MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Default SvelteKit node adapter body limit is 512KB — too small for audio recordings (30s ~556KB, longer recordings much larger). Set bodySize: 500MB in adapter config. Also set BODY_SIZE_LIMIT env in production compose .env as belt-and-suspenders. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- svelte.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/svelte.config.js b/svelte.config.js index 9409ebb..1d51690 100644 --- a/svelte.config.js +++ b/svelte.config.js @@ -6,7 +6,7 @@ const config = { runes: ({ filename }) => (filename.split(/[/\\]/).includes('node_modules') ? undefined : true) }, kit: { - adapter: adapter({ out: 'build' }), + adapter: adapter({ out: 'build', bodySize: 500 * 1024 * 1024 }), // 500 MB for audio uploads // CSRF origin check disabled: this app uses no cookie-based session auth, // and the Web Share Target POST legitimately arrives from external origins. csrf: { checkOrigin: false }