Uploading Image to Amazon s3 with HTML, javascript & jQuery with Ajax Request (No PHP)

前端 未结 5 1328
无人及你
无人及你 2020-11-28 00:48

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 Javascrip

5条回答
  •  星月不相逢
    2020-11-28 01:27

    Amazon just allowed Cross-Origin Resource Sharing, in theory it allows your users to upload to S3 directly, without using your server (and PHP) as a proxy.

    Heres the docs -> http://docs.amazonwebservices.com/AmazonS3/latest/dev/cors.html

    They do a great job of telling you how to enable it on an S3 bucket, but iv found no actual javascript examples of how to get data from client to bucket.

    First person to post CORS.js is a legend xD

提交回复
热议问题