T
tRPC

How to set sizeLimit > 1MB (to solve 413 error)?

How to set sizeLimit > 1MB (to solve 413 error)?

Ppeternovak9/12/2023
Hi all, I am trying out the T3 stack where I want to send area polygons given by the user to my NextJs backend using TRPC. It worked well for smaller polygons drawn by hand, but one I allowed my users to upload files over 1MB I run into the problem of '413 (Body exceeded 1mb limit)' I found in the NextJs documentation: https://nextjs.org/docs/pages/building-your-application/routing/api-routes#custom-config that the setting to enable this is to reconfigure this limit to something like: sizeLimit: '4mb', In a suitable place. I have tried to add this configuration into various places of my trpc.ts but so far without success. Does anyone have any advice of how to reconfigure this limit properly? Greateful for all advises!
No description

Looking for more? Join the community!

T
tRPC

How to set sizeLimit > 1MB (to solve 413 error)?

Join Server