Skip to content

busboy and uws.getParts #120

Answered by kartikk221
joshxyzhimself asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @joshxyzhimself The uWS.getParts() method requires the full body as a RecognizedString which would mean that the incoming body has to be fully available in memory for uWS to output the Multipart fields, this is simply inefficient and would in some cases exhaust the memory where large files are being uploaded.

Busboy on the other hand acts as an asynchronous parser which gradually consumes the incoming stream of data and emits events to allow for consumption of multipart fields as they are detected through the body stream. Furthermore, HyperExpress will automatically pause/resume the incoming body stream in-between Multipart events to allow for the user to perform some async processing …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by kartikk221
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants