Open robharper opened 7 years ago
Hey thanks, brilliant report!
Sorry for the late answer, I was traveling around my country. I will look what I can do but PRs & ideas are welcome.
I'll try it and will see what i can do, otherwise i'll switch to busboy under the hood and see if it's okey.
What you think about switching to busboy
instead of formidable
? Formidable has lot of problems and I and few other folks are the new maintainers, but i don't see we can get it better soon.
Hey @robharper, any response to above question? :)
Version: 3.0.2
Description: Providing a custom Formidable
IncomingForm
instance via theIncomingForm
option on create causes concurrent uploads to put that instance in a bad state. The concurrent uploads usually fail with the following error message. Any further uploads after this failure will not complete until the connection times out.My understanding of Formidable is that the
IncomingForm
instance should not be reused across requests. The problematic lines inkoa-better-body
appear to be here.Steps to reproduce: Use the example code from the Formidable recipe here: https://github.com/tunnckoCore/koa-better-body/tree/master/recipes/formidable
Use the following to get the server into a failed state:
where
path_to_some_reasonable_sized_file
should supply something large enough to ensure the uploads are concurrent. In my case it was a file ~ 500kb.After the above command, any further upload will lock until the connection times out. E.g. use the recipe's example
curl
: