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
Pipe validation for @UploadFiles()
not working
#13532
Labels
needs triage
This issue has not been looked into
Comments
Hi @shreyas-segu this is already discussed here: nestjs/docs.nestjs.com#2424 I would suggest du use a custom validation pipe until it is implemented in the framework directly. This is a adjusted copy of what was already mentioned in the original thread - but it should work with your example as I am using the exact same structure / definition of payload.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is there an existing issue for this?
Current behavior
The pipe validation for the
@UploadFiles
annotation is not working, whereas the@UploadFile()
annotation is working as expectedMinimum reproduction code
https://github.com/shreyas-segu/multiple-files-upload-validation-bug
Steps to reproduce
request.txt
to execute the curl request which is not working as expected, use theSamplePNGImage_100kbmb.png
for the sample filerequest-working.txt
for the curl request which is working, you can use the same fileExpected behavior
The multiple files upload endpoint with the pipe validation should not throw any validation errors.
Package
@nestjs/common
@nestjs/core
@nestjs/microservices
@nestjs/platform-express
@nestjs/platform-fastify
@nestjs/platform-socket.io
@nestjs/platform-ws
@nestjs/testing
@nestjs/websockets
Other package
No response
NestJS version
10.3.2
Packages versions
Node.js version
v20.11.0
In which operating systems have you tested?
Other
No response
The text was updated successfully, but these errors were encountered: