-
Notifications
You must be signed in to change notification settings - Fork 27k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: serverActions.bodySizeLimit is ignored #59277
Comments
I'm having the same problem, set it to |
I have done some investigation I think I have figured out what the issue is. When using a Server Action as a action on a When making a The place where There is a test for larger Server Actions here: https://github.com/vercel/next.js/blob/canary/test/e2e/app-dir/actions/app-action-size-limit-invalid.test.ts#L79-L120 however it is not testing for form-submits. I am able to get it work by applying this
However there seems to be a mismatch for how I am not sure how to proceed from here. |
I am having this issue as well.. forms were working no problem with server actions now all of a sudden today I am having this issue. Why do devs just randomly decide to implement this kind of behavior? None of the config changes are working and now my forms are limited to 1MB which is insane. |
I'm also having this problem. Forms being limited to 1 MB is a really rough situation to be in if you want to do any kind of image/file uploading. I'm at Next 14.0.4, is there any kind of workaround? |
I think you would be able to do it with a client-side fetch and a API route.
For large JSON you could do it without |
I'm having the same issue, I persist to handle file form submission in server action rather in client. |
I am also having this issue as well. I am trying to upload JSON data to Amazon S3. |
When using Server Actions with a form the fields are getting truncated at 1MB because of `busboy`'s default `fieldSize` limit of 1MB. This PR tries to solve #59277 however there is a mismatch about `fieldSize` and `bodySize`. I have tried creating a PR for `busboy` mscdex/busboy#351 to allow configuring a max size for the entire body. ### TODO: - [ ] Figure out if this is acceptable - [ ] Throw error when `bodySizeLimit` is hit. <!-- Thanks for opening a PR! Your contribution is much appreciated. To make sure your PR is handled as smoothly as possible we request that you follow the checklist sections below. Choose the right checklist for the change(s) that you're making: ## For Contributors ### Improving Documentation - Run `pnpm prettier-fix` to fix formatting issues before opening the PR. - Read the Docs Contribution Guide to ensure your contribution follows the docs guidelines: https://nextjs.org/docs/community/contribution-guide ### Adding or Updating Examples - The "examples guidelines" are followed from our contributing doc https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md - Make sure the linting passes by running `pnpm build && pnpm lint`. See https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md ### Fixing a bug - Related issues linked using `fixes #number` - Tests added. See: https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ### Adding a feature - Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. (A discussion must be opened, see https://github.com/vercel/next.js/discussions/new?category=ideas) - Related issues/discussions are linked using `fixes #number` - e2e tests added (https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) - Documentation added - Telemetry added. In case of a feature if it's used or not. - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ## For Maintainers - Minimal description (aim for explaining to someone not on the team to understand the PR) - When linking to a Slack thread, you might want to share details of the conclusion - Link both the Linear (Fixes NEXT-xxx) and the GitHub issues - Add review comments if necessary to explain to the reviewer the logic behind a change ### What? ### Why? ### How? Closes NEXT- Fixes # --> Fixes #59277, closes #61462. --------- Co-authored-by: Shu Ding <g@shud.in>
Have the same problem. I am sending base64 file string and the data that is received in server action is always limited to |
This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Link to the code that reproduces this issue
https://github.com/TryingToImprove/next-app-router-body-size-issue
To Reproduce
Current vs. Expected behavior
Should not fail -
bodySizeLimit
should workVerify canary release
Provide environment information
Which area(s) are affected? (Select all that apply)
App Router
Additional context
Relevant code is here: TryingToImprove/next-app-router-body-size-issue@6efd384
The text was updated successfully, but these errors were encountered: