-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
feat: add upload functionality in the middleware #7323
Conversation
🦋 Changeset detectedLatest commit: cb75088 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
packages/middleware/__tests__/integration/bootstrap/serverWithUpload.ts
Outdated
Show resolved
Hide resolved
* Configuration options for handling file uploads. | ||
* @see FileUploadOptions | ||
*/ | ||
fileUpload?: FileUploadOptions; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it could be great if we achieved an option to set the config based on the request
fileUpload?: FileUploadOptions; | |
fileUpload?: FileUploadOptions | (req: Request) => FileUploadOptions; |
I believe user may create multiple endpoints for file upload, and some of them may differ for instance in allowedMimeTypes or maximum number of files
998eacc
to
4f3dced
Compare
4f3dced
to
cb75088
Compare
Quality Gate passedIssues Measures |
Summary
The issue involves enhancing the middleware express app by allowing the addition of multiple body parsers. Currently, only the JSON body parser is available, which limits functionality for developers needing to implement file uploads.
Context
The middleware express app is currently configured to use only a JSON body parser. This restriction poses challenges for developers who require different body parsers for specific functionalities, such as file uploads.