Replies: 1 comment
-
I previously gave some answer on this matter here: #74766 ~ I think it is still problematic as of today |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
Hi, I have created an image upload using server actions. My server action looks like this:
In
next.config.ts
I have adjusted thebodySizeLimit
:Now I can upload files until 5mb. But if I upload files that exceed that limit, I get the following error in the console:
However the request on the client never gets the response status code 413. How can I return an response from nextjs to catch that error on the client and show a proper error message to the user? From #74766 I already found out, that I cannot catch this error on the server, because that checking is done before my server action function executes. But shouldnt nextjs return this status code also to the user instead of keeping that connection open?
Same occours when I try to upload the file via an external API client (like postman). The request never gets an response...
Additional information
No response
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions