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
You'll need to configure the S3 bucket to allow your domain. This link might help.
Copy link to clipboard
Copied
You'll need to configure the S3 bucket to allow your domain. This link might help.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now