Download file from url and upload it to AWS S3 without saving - node.js
问题 I'm writing an application which downloads images from a url and then uploads it to an S3 bucket using the aws-sdk. Perviously I was just downloading images and saving them to disk like this. request.head(url, function(err, res, body){ request(url).pipe(fs.createWriteStream(image_path)); }); And then uploading the images to AWS S3 like this fs.readFile(image_path, function(err, data){ s3.client.putObject({ Bucket: 'myBucket', Key: image_path, Body: data ACL:'public-read' }, function(err, resp