How to handle FE requests > 1MB?

Hi all, I am sending some large polygons from my frontend for evaluation in the backend but when they get big I get the error message 413 "Body exceeded 1mb limit" I have read I should be adding the configuration: api: { bodyParser: { sizeLimit: "5mb", }, }, but when I add it to the api.ts in the utils folder I don't see any difference. What is the proper way to increase this limit of how much I could send from my frontend to my NextJs backend?
No description
1 Reply
peternovak
peternovakOP15mo ago
I assume the sizeLimit setting from here should be possible to add in the T3 configuration? https://nextjs.org/docs/pages/building-your-application/routing/api-routes#custom-config
Routing: API Routes
Next.js supports API Routes, which allow you to build your API without leaving your Next.js app. Learn how it works here.
Want results from more Discord servers?
Add your server