How to avoid the data of request stream loss after doing some authentication on node.js?
问题 How do request streams works with node.js (express or restify) ? When a client who tries to upload an audio, mpeg or other binary file to the server, the request should be a Readable Stream on the server. that we could pipe into another stream using request.pipe() to for example get the file from the request, and then upload the file to amazon s3 using knox. When I'm using an asynchronous authentication method part of the streamed data is being lost and the length doesn't match with the