{"id":3543,"date":"2018-09-05T13:31:00","date_gmt":"2018-09-05T13:31:00","guid":{"rendered":"https:\/\/purelysupp.com\/wordpress\/?p=3543"},"modified":"2022-09-10T20:44:53","modified_gmt":"2022-09-10T20:44:53","slug":"cors-config-for-amazon-s3-3d-flipbook","status":"publish","type":"post","link":"https:\/\/purelysupp.com\/wordpress\/code-snippets\/cors-config-for-amazon-s3-3d-flipbook\/","title":{"rendered":"\u00a0Cors Config for Amazon S3 &#038; 3d FlipBook"},"content":{"rendered":"\n<p>In order to enable storing and using files (images and PDF&#8217;s) for 3D Flip-Books, you will need to enable CORS (Cross-origin resource sharing) with your S3 account; see the video below for implementation. Failure to enable CORS will prevent the 3d Flip-Book from loading the files required for the Flip-Book. <\/p>\n\n\n\n<p>As always, use at your own risk and remember to backup your site prior to inserting new code.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;\n&lt;CORSConfiguration xmlns=\"http:\/\/s3.amazonaws.com\/doc\/2006-03-01\/\"&gt;\n&lt;CORSRule&gt;\n    &lt;AllowedOrigin&gt;*&lt;\/AllowedOrigin&gt;\n    &lt;AllowedMethod&gt;GET&lt;\/AllowedMethod&gt;\n    &lt;MaxAgeSeconds&gt;3000&lt;\/MaxAgeSeconds&gt;\n    &lt;ExposeHeader&gt;Accept-Ranges&lt;\/ExposeHeader&gt;\n    &lt;ExposeHeader&gt;Content-Range&lt;\/ExposeHeader&gt;\n    &lt;ExposeHeader&gt;Content-Encoding&lt;\/ExposeHeader&gt;\n    &lt;ExposeHeader&gt;Content-Length&lt;\/ExposeHeader&gt;\n    &lt;AllowedHeader&gt;Range&lt;\/AllowedHeader&gt;\n    &lt;AllowedHeader&gt;Authorization&lt;\/AllowedHeader&gt;\n&lt;\/CORSRule&gt;\n&lt;\/CORSConfiguration&gt;<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"3D FlipBook plugin and Amazon S3 - Simple Cloud Storage Service\u200e\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/U2nFc4Ksjuo?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>In order to enable storing and using files (images and PDF&#8217;s) for 3D Flip-Books, you will need to enable CORS (Cross-origin resource sharing) with your S3 account; see the video below for implementation. Failure to enable CORS will prevent the 3d Flip-Book from loading the files required for the Flip-Book. As always, use at your\u2026&nbsp;<a href=\"https:\/\/purelysupp.com\/wordpress\/code-snippets\/cors-config-for-amazon-s3-3d-flipbook\/\" class=\"rmlink\">Read More<\/a><\/p>\n","protected":false},"author":1,"featured_media":3547,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","iawp_total_views":3,"wds_primary_category":56,"footnotes":""},"categories":[56,58],"tags":[61,80,81],"class_list":{"0":"post-3543","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-code-snippets","8":"category-plugins","9":"tag-cors","10":"tag-media","11":"tag-plugins","12":"entry"},"featured_image_src":"https:\/\/purelysupp.com\/wordpress\/wp-content\/uploads\/sites\/2\/2018\/09\/code-snippits-600x400.jpg","featured_image_src_square":"https:\/\/purelysupp.com\/wordpress\/wp-content\/uploads\/sites\/2\/2018\/09\/code-snippits-600x515.jpg","author_info":{"display_name":"Jack Alltrade","author_link":"https:\/\/purelysupp.com\/wordpress\/author\/jacka11trade\/"},"_links":{"self":[{"href":"https:\/\/purelysupp.com\/wordpress\/wp-json\/wp\/v2\/posts\/3543","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/purelysupp.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/purelysupp.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/purelysupp.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/purelysupp.com\/wordpress\/wp-json\/wp\/v2\/comments?post=3543"}],"version-history":[{"count":4,"href":"https:\/\/purelysupp.com\/wordpress\/wp-json\/wp\/v2\/posts\/3543\/revisions"}],"predecessor-version":[{"id":3563,"href":"https:\/\/purelysupp.com\/wordpress\/wp-json\/wp\/v2\/posts\/3543\/revisions\/3563"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/purelysupp.com\/wordpress\/wp-json\/wp\/v2\/media\/3547"}],"wp:attachment":[{"href":"https:\/\/purelysupp.com\/wordpress\/wp-json\/wp\/v2\/media?parent=3543"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/purelysupp.com\/wordpress\/wp-json\/wp\/v2\/categories?post=3543"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/purelysupp.com\/wordpress\/wp-json\/wp\/v2\/tags?post=3543"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}