Harman
Harman

Reputation: 1753

Amazon s3 upload image

I have a image url:

http://mariagecotesud.com/images/partenaires/imag-en-soie/imag-en-soie_big_4.jpg

I want to upload this image to my amazon s3 bucket with the help of php. Is any way to upload direct on my amazon s3?

Upvotes: 1

Views: 353

Answers (1)

E.J. Brennan
E.J. Brennan

Reputation: 46879

If you are asking "Can I tell amazon where to find the image and have it loaded into s3 directly from that remote location", the answer is no.

You can certainly upload the image to S3, but the first part of your code has to be the retreiving of that image from the target URL and saving to a local file, and then including that local file name in the S3.PutObject call.

Downloading the image from your URL to a local file should be trivial to implement, and once you have it locally, uploading it is also easy using the SDK.

Upvotes: 2

Related Questions