-
Notifications
You must be signed in to change notification settings - Fork 212
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
In v1 fileSize
limit is 1 byte off
#297
Comments
This issue is currently blocking upgrading I tried looking at a PR to fix this issue, but got confused about what the right way to fix it was. There was a spot mindlessly adding a |
@mscdex can you please at least triage this issue? It hasn't been acknowledged for a whole month now. We really need to know roughly when this will be fixed, or at least have some guidance for contributing a PR. We are now in this hard position where I'm now forced to entertain the option of a major release of |
I haven't had time to look into it. |
There is a similar issue for We are also in a similar situation as @jaydenseric and it would impact our users in a similar way too. I looked into the issue, and made an attempt at a fix, which is just a guess, tbh, but hopefully it might start the ball rolling in the right direction. |
I found a problem.If fileSize limit is a Float number it can not working. So I can not set it to 0.4 * 1024 * 1024. I have to make sure it's a whole number. |
Before
busboy
v1, thefileSize
limit would be the number of bytes that are allowed. Now in v1, it's changed to being the number of bytes that first exceeds the limit.Basically, if in the
busboy
limits you setfileSize: 1
and a text file contains only 1 character, it used to be allowed without truncating the file contents. Now with v1 in the same situation thelimit
event is emitted in the file stream and truncation occurs.I think the new behavior is incorrect, and the old behavior should be restored in a bug fix patch release. I noticed this issue because tests started failing in
graphql-upload
when attempting to update thebusboy
dependency.The text was updated successfully, but these errors were encountered: