Closed sven5 closed 2 years ago
Can you elaborate a bit? Those are just the normal node.js writable stream methods. You shouldn't need to use them though if you are feeding busboy
data from another (readable) stream, in which case you can use something like pipe()
to automatically handle writes and backpressure.
ah ok, now I see, thanks. We have kind of special use case here, we're using busboy in Azure functions. Especially, we're using this library as a helper for dealing with multi-part form data in an Azure function.
The only usual hangup people have with cloud functions is realizing that the request body is already buffered somewhere by the cloud function SDK, so pipe()
ends up doing nothing (when using the examples).
Aside from that, just make sure you always call .end()
to be on the safe side.
I thank you for the amazing library you provide, but I had the same problem and lost 4 hours of work before finding about the .end().
In the end I found the correct code on a stackoverflow request (https://stackoverflow.com/questions/73217059/busboy-missing-file-data) about something else. I'm a Front-end developer mainly, so I didn't know about .write() and .end()
@Lonolf Just as a heads up, write()
and end()
are a standard part of node.js streams, so you may find yourself using them again if you work with streams.
Some documentation on how and when to use
write()
andend()
would be really helpful. Thanks