Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to increase body size limit for adapter-node

Currently I have an action that is working fine when the uploaded file is small. When it gets bigger, like 7MB, I get an error "Invalid request body". How to fix it?

I am using adapter-node. I've read the docs: https://kit.svelte.dev/docs/adapter-node#environment-variables-body-size-limit

But I don't know how to set it. Help Me?

like image 422
Rodrigo Pereira Avatar asked Sep 06 '25 03:09

Rodrigo Pereira


1 Answers

Turns out that is only start node with the env variable.

BODY_SIZE_LIMIT=20000000 node index.js
like image 64
Rodrigo Pereira Avatar answered Sep 07 '25 23:09

Rodrigo Pereira