413 request entity too large on Route handler #70621
Replies: 2 comments
-
|
Unfortunately, it is not possible to set body size limit for Route Handlers in App Router (#57501). You might want to use Server Action and set the |
Beta Was this translation helpful? Give feedback.
-
|
Hi, Often times, when it comes to images, and other kind of asset uploads, it is better to use a dedicated service, for example Cloudinary, where you upload the image to, and get back a URI, which is then used together with the form submission, so that your DB can save the location of such asset. S3 buckets, and alike technology, are also an alternative, etc... Here's a bit of reasoning from the docs, regarding the size limits, in this case for Pages Router, but it is the same reason at large, for App Router:
And the implicit recommendation to use a CDN:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
What is the magic incantation that I have to add so that I can upload large images via a form?
Beta Was this translation helpful? Give feedback.
All reactions