next.js icon indicating copy to clipboard operation
next.js copied to clipboard

bug: Fields truncated when submitting form using Server Actions

Open TryingToImprove opened this issue 1 year ago • 0 comments

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 https://github.com/vercel/next.js/issues/59277 however there is a mismatch about fieldSize and bodySize. I have tried creating a PR for busboy https://github.com/mscdex/busboy/pull/351 to allow configuring a max size for the entire body.

TODO:

  • [ ] Figure out if this is acceptable
  • [ ] Throw error when bodySizeLimit is hit.

TryingToImprove avatar Dec 22 '23 11:12 TryingToImprove