Reputation: 4287
I'm using Node.JS to proxy a file upload to a remote endpoint and need to make sure my Node server doesn't buffer the file excessively.
I'm using res.write
to push in the following way:
apiRes.on('data', function (chunk) {
body += chunk;
res.write(chunk);
});
(The connection is faster from client to node than from node to the remote).
Note that the client is a browser, if that wasn't clear.
Upvotes: 2
Views: 634
Reputation: 76
Upvotes: 2