Size Limitation for Server Actions in Next.js 14 #57973
Replies: 8 comments 5 replies
-
ditto -- where is this documentation? |
Beta Was this translation helpful? Give feedback.
-
Running into a similar issue - it seems that regardless of whether
|
Beta Was this translation helpful? Give feedback.
-
At this point, I'm convinced that there is not an official way to increase serverActions bodySizeLimit. After testing, I don't believe the limit I've put in place above actually works as expected. I followed the instructions here for 14, which yields an 'incorrect config' error upon application start, and does not seem to work as expected. Can someone from the nextjs team comment as to whether this is definitively supported or not? If so, we'd really appreciate the documentation being updated to reflect the best practice. |
Beta Was this translation helpful? Give feedback.
-
I have the same issue. Doc has not been updated, and there seem to be no way to do this. |
Beta Was this translation helpful? Give feedback.
-
The workaround I came up with in the meantime is to compress the body of the POST before sending it and decompress it on the API side afterwards. For strings, I use |
Beta Was this translation helpful? Give feedback.
-
How do we flag this to the Next.js team? I followed the documentation; however, the config seems to have no effect on the body size limit. |
Beta Was this translation helpful? Give feedback.
-
This is still an ongoing issue in Next.js 14 had to compress and then decompress in the API route to work around. |
Beta Was this translation helpful? Give feedback.
-
I have a small PoC in Basically my PoC consists in a local video uploader, the file is then sent on a button click to Whisper to get the transcription. Everything happens in the client except the request to OpenAI, which is made from the server (to keep access keys private). First I implemented it defining an API, and when I hit the 4.5MB size limit of the payload of server functions (I'm dealing with videos that usually are up to 10MB), I used a server action instead. Server actions did fine in local environment; but when deployed the app on Vercel I got the Summing it up, these were my findings: Using a Server action to send a file in a form data payload. Size limit of 25MB in Next Config:
|
Beta Was this translation helpful? Give feedback.
-
https://nextjs.org/docs/app/api-reference/functions/server-actions#size-limitation
How can I increase the size limit for Server Actions in Next.js 14? Since Server Actions are stable, the documentation is outdated.
Beta Was this translation helpful? Give feedback.
All reactions