-
-
Notifications
You must be signed in to change notification settings - Fork 7.7k
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
FileInterceptors does not support different field names #741
Comments
Hi @thg303, |
here's my PR. please check it out. please let me know if there's anything missed/wrong about it. |
PR merged. Leaving opened to remember about the docs |
Added in the v5.1.0 release. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I'm submitting a...
[ ] Bug report
[X] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.
Current behavior
there are two interceptors
FileInterceptor
andFilesInterceptor
based onmulter.uploadSingle
andmulter.uploadArray
. they allow uploading a single file, or multiple files with same field name. however if say there is a form with two different filed name to be uploaded. like "avatar" and "passport". currently there is not support formulter.fields
which addresses this requirement.Expected behavior
based on current implementation, I suggest adding a new interceptor for this behaviour to "@nestjs/common" like:
The text was updated successfully, but these errors were encountered: