I want to download a image file to server first, then upload this file to other server.
If there is no download file step, it will be very simple
download file step
This works for me:
var fs = require('fs'); var request = require('request'); var formData = { method : 'POST', url : 'http://127.0.0.1:3000', json : true, formData : { file : request(downloadUrl) } }; request(formData, function(err, res, body){ if (err) throw err; console.log("successful"); });