amazon s3 CORS problem
Dear
I use that code to embed PDF on my website and I host the files on AWS s3 file storage
<div id="adobe-dc-view" style="height: 800px;padding-bottom: 50px"></div>
<script src="https://documentcloud.adobe.com/view-sdk/main.js"></script>
<script type="text/javascript">
document.addEventListener("adobe_dc_view_sdk.ready", function()
{
var adobeDCView = new AdobeDC.View({clientId: "XXXXX", divId: "adobe-dc-view"});
adobeDCView.previewFile(
{
content: {location: {url: "https://s3-eu-west-1.amazonaws.com/file.pdf"}},
metaData: {fileName: "title"}
});
});
</script>
and I have CORS problem, How I can solve it?
Access to XMLHttpRequest at 'https://s3-eu-west-1.amazonaws.com/' from origin www.example.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Thanks
