Can we upload image directly from url to amazon S3

715 views Asked by At

I am using nodejs and trying to upload file from url to amazon s3 directly.

Here is my code

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));

            });

But console.log ios showing undefined. Also there is no image on Amazon S3.

Any Suggestions

Thanks

1

There are 1 answers

0
rdegges On BEST ANSWER

There's currently no way to do this -- you have to first download the file from the URL, then upload it into Amazon.