I am developing a website in HTML, javascript & jQuery. I want to upload images to amazon s3 server in an ajax request. There is no such SDK to integrate s3 in Javascript. A PHP SDK is available, but it is not useful to me. Can anybody provide solution to this in javascript?
Share
Got Amazon S3 & CORS working on js and html5 using XMLHTTPObject based on this article article.
1: CORS only works from a proper URL “http://localhost“. (file///xyz will make you go insane)
2 : Make sure you got the POLICY and Secret compiled correctly – here is my policy and this is the link you can get the project to get you started with Signature and Policy — do not publish this JS with your Secret EVER!
Here is the JS code
Helper functions
Then the HTML Form
Happy CORS-ing!