-
Notifications
You must be signed in to change notification settings - Fork 213
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
partsLimit
is being thrown when busboy is configured for one file
#287
Comments
Same. Minimal code to reproduce the issue here: https://github.com/reviewingcode/busboy-multipart-file-upload ^basically the example code from README - with |
It seems that the issue has something to do with the part limit not being followed, and was introduced in this commit! After looking at the code, I could not explain this line and I thought that this might be the cause of the issue: @mscdex |
When you look at the code changes, it looks like two changes collided. The event 'partsLimit' used to be emitted too late, now it is emitted when the limit is reached, as described in the readme file. But on the other hand, part limit, which was enforced in the same code chunk, was right. The check on line 445 seems indeed to be too zealous, and the new code drops parts too early. I am by no means qualified to work on this code, just comparing versions without an understanding of the full context. But is this code still maintained (sorry, can't help on this :-( )? Thanks! |
@mscdex hi, thanks for maintaining this lib so far would you consider looking into this issue in the near future? |
Busboy is configured as:
A single file upload like so:
Why would the
partsLimit
be thrown? Is there something else inside the multipart? On the other hand when I configure the options to limit the files to 2, and when I upload 2 files, thefilesLimit
is not thrown. The same for field limit. I would expect the same behaviour forpartsLimit
-- to be thrown when I have violated the limit, not fulfilled the limit.The text was updated successfully, but these errors were encountered: