I am new to Amazon S3. I want to upload all my images / PDF to S3 and let the user access those by using the URL. I am reading up the documentation and landed on this page:
http://docs.aws.amazon.com/AmazonS3/latest/dev/UploadObjSingleOpNET.html
This sample only uploads the image. How would I get the URL of the uploaded image so I can store them in my database and my user can use them to view the image?
For eg. Shouldn't it offer some url like http://aws.amazon.com/bucket-name/image-name.jpg
and then I can type in that url in the browser and view my uploaded image from amazon.
Any help is appreciated.
Amazon don't give you the URL because the structure is already know before you upload a file.
http(s)://<bucket>.s3.amazonaws.com/<object>
http(s)://s3.amazonaws.com/<bucket>/<object>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With