next js 13 request body size configuration
how to customize the maximum size of the request body in next js 13 api route ?
5 Replies
welp depends on the browser and whether its hosted on serverless
https://nextjs.org/docs/messages/api-routes-response-size-limit
Why do you need it in the first place
Guess you're sending files? What for?
yup , but from client to api
But what does the api have to do with the file
first streaming it , then doing some manipulations , and finally send it to s3
i can't find a way to set limits because tools like multer / busboy won't work in next js 13
the only way to receive files now is by : await req.formData()
so if the file is 1TB my api can't do anything before the stream get finished,
that seems like a ridiculously large file