formidable
formidable copied to clipboard
Issue when parsing large files
I don't know the inner workings of the problem, because I didn't build the library where the error is coming from, but please see https://github.com/tunnckoCore/koa-better-body/issues/109.
Yup. It seems like problem in node-formidable. And if this helps to anyone, here's explanation.
In the given issue, there is really well-known and all loved "cannot read of undefined"
TypeError: Cannot read property 'fields' of undefined
Yep, but it isn't a problem in my code, because in that line the result variable must be an object with fields and files properties which comes directly when "end" event of Formidable is fired here.
Now i'm starting to think that it not even goes to there, but probably aborted or error event is fired.
Yes, i should probably add one try catch block there so we can debug more. Btw, @maximedupre you can try locally and see what is the real error. I'm sure that one of above events are fired.
The onerror event handle of koa-better-body is being fired with the above error.
Ssstrange. I seriously think that the problem is here, but i'll check what i can do in my lib as soon as i get a bit more time.
Is it an issue inside koa-better-body or formidable ?
It cannot be at koa-better-body for sure. I don't do anything specific and spectacular there, just calling Formidable (.parse without callback).