HTML5 Canvas getImageData and Same Origin Policy

后端 未结 9 1404
夕颜
夕颜 2020-11-29 07:49

I have a site running at pixie.strd6.com and images hosted through Amazon S3 with a CNAME for images.pixie.strd6.com.

I would like to be able to draw these images to

9条回答
  •  孤街浪徒
    2020-11-29 08:14

    To edit your S3 bucket permissions:

    1) Sign in to the AWS Management Console and open the Amazon S3 console at https://console.aws.amazon.com/s3/

    2) In the Buckets list, open the bucket whose properties you want to view and click "add CORS configuration"

    amazon-screen-shot

    3) Write the rules you are willing to add in between the tags

    
      
        *
        GET
        3000
        *
      
    
    

    You can learn more about rules at: http://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html

    4) Specify crossorigin='anonymous' on the image you'll use in your canvas

提交回复
热议问题