Skip to content
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

fix: formData handling on Vercel #6067

Merged
merged 7 commits into from
Apr 26, 2024
Merged

fix: formData handling on Vercel #6067

merged 7 commits into from
Apr 26, 2024

Conversation

JarrodMFlesch
Copy link
Contributor

@JarrodMFlesch JarrodMFlesch commented Apr 26, 2024

Description

Adjust how body data is read based on the size.

IF the content-type is multipart:

  • If the body is <= 4MB, read the body with req.formData()
  • Else use busboy to read the body stream

Busboy does not seem to function properly on Vercel. (May be incompatible, searching online lead to inconclusive results, I assume it has to do with calling request.body.getReader()).

  • I have read and understand the CONTRIBUTING.md document in this repository.

Type of change

  • Chore (non-breaking change which does not add functionality)

Checklist:

  • I have added tests that prove my fix is effective or that my feature works
  • Existing test suite passes locally with my changes
  • I have made corresponding changes to the documentation

@JarrodMFlesch JarrodMFlesch merged commit e71c1c2 into beta Apr 26, 2024
8 of 9 checks passed
@JarrodMFlesch JarrodMFlesch deleted the fix/beta/form-data branch April 26, 2024 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant