node.js - Best approach to forward upload stream -
i'm working on rest server script written in nodejs. script lets user post request uploading files. since server not responsible store files , taken care of remote server rest server, forward/redirect file upload stream remote server. best approach that?
should buffer stream , wait until receive file in entirety before streaming remote server? or
should pipe chunks remote server receive them? tried piping in upload route statement -
req.pipe(request.post(connection).pipe(res)
but received error remote server - "connection has been cancelled client". or
is possible redirect incoming upload stream remote server script wouldn't middleman?
thanks
Comments
Post a Comment