Skip to content

Instantly share code, notes, and snippets.

@scaleupcto
Created June 9, 2014 09:57
Show Gist options
  • Save scaleupcto/19eca489741d6341489c to your computer and use it in GitHub Desktop.
Save scaleupcto/19eca489741d6341489c to your computer and use it in GitHub Desktop.
var http = require('http');
app.get('/my/tn/upload/endpoint',function(req,res) {
var depotRequest = http.createRequest(....)
// handler for receving a chunk of file from web app
req.on('data', function(chunk) {
depotRequest.write(chunk); // send a chunk at a time to depot, see http://nodejs.org/api/http.html#http_request_write_chunk_encoding
});
req.on('end',function() {
res.send(200);
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment