amazon s3 CORS problem

New Here ,
Apr 06, 2021 Apr 06, 2021

Copy link to clipboard

Copied

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

Views

40

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct Answer

Adobe Community Professional , Apr 06, 2021 Apr 06, 2021
You'll need to configure the S3 bucket to allow your domain. This link might help. 

Likes

Translate

Translate
Adobe Community Professional ,
Apr 06, 2021 Apr 06, 2021

Copy link to clipboard

Copied

LATEST

You'll need to configure the S3 bucket to allow your domain. This link might help. 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines