-
-
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
Using FileInterceptor with multerOptions.fileFilter not working properly #437
Comments
You could solve the issue in the fileFilter by setting a req.fileValidationErrror and check for any fileValidationError. But errors from limits remain unvisable. So, I think this is a valid issue.
How do I access the limits fileSize error in my controller? serializeError(error).code would result in LIMIT_FILE_SIZE. Multer returns an error like:
|
Fixed 🔥 |
I confirm that it is now working the way it should, great job, thanks! |
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...
Current behavior
Expected behavior
Expect only .mp4 files to uploaded, and other types to throw Error.
Right now, Error is not thrown.
Minimal reproduction of the problem with instructions
What is the motivation / use case for changing the behavior?
Environment
The text was updated successfully, but these errors were encountered: