2

我正在使用 nodejs 并尝试将文件从 url 直接上传到 amazon s3。

这是我的代码

knox.putFile('http://www.wikihow.com/Image:Make-Handprint-Art-Step-1.jpg','foldername/'+new_image_name, {"Content-Type": "image/jpeg",'x-amz-acl': 'public-read'}, function (err, result) {
                    console.log(JSON.stringify(result));

            });

但是 console.log ios 显示未定义。Amazon S3 上也没有图像。

有什么建议么

谢谢

4

1 回答 1

1

目前没有办法做到这一点——您必须首先从 URL 下载文件,然后将其上传到亚马逊。

于 2014-11-21T07:03:19.073 回答