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
barry
barry11mo ago
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?
samon
samon11mo ago
yup , but from client to api
barry
barry11mo ago
But what does the api have to do with the file
samon
samon11mo ago
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,
barry
barry11mo ago
that seems like a ridiculously large file
Want results from more Discord servers?
Add your server
More Posts