Conversation
|
Yes, it does look like the right solution. Can we cover it with tests though? |
|
tbh I have no idea how to simulate an aborted upload. |
|
Do you have any idea how to implement it? |
|
Looking through the tests, I would do it similar to the multipart-pause ( )Btw, would you need to clear the event listener on busboy after the file has been succesfully processed? |
|
Any update on this one? |
|
I can try adding the test in a day or two if @Uzlopak doesn't do it first. |
|
If you call destroy again, it is handled as a no-op. https://nodejs.org/api/stream.html#writabledestroyerror Regarding the removal of the listener: Does it really matter? It either fails totally or it succeeds together. We dont pass an error object to destroy, so destroying the busboy-stream after we processed everything should not result in any additional errors. So if the FileStream got piped and processed it can be savely destroyed, imho. |
|
So what is now with this PR? |
Should fix fastify/fastify-multipart#315
Checklist
npm run testandnpm run benchmarkand the Code of conduct