FileInterceptor : The file size check of FileInterceptor is not effective, and the file will be compressed, and the file in fileFilter does not have a file size key #14357
Labels
needs triage
This issue has not been looked into
Is there an existing issue for this?
Current behavior
Minimum reproduction code
https://github.com/uqianr/fileInterceptor-error-example
Steps to reproduce
I uploaded a file that didn't meet the size limit, and it didn't pop up an error but changed the file size
Expected behavior
I hope it can pop up an error and stop writing to disk, or in the filter file can get the file size and manually implement verification. Instead of verifying through Express.Multer.File, because at this time it has already been written to disk
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.0.0
Packages versions
Node.js version
20.18.0
In which operating systems have you tested?
Other
No response
The text was updated successfully, but these errors were encountered: