Highlighted

File preview not available, please reload to try again. - Azure

Community Beginner ,
Mar 01, 2020

Copy link to clipboard

Copied

I am running Azure with Blob Storage. I created credentials for my domain and my subdomain. My subdomain is the blob storage. No matter which credential I use I get the error "File Preview Not Available"

 

<div id="adobe-dc-view"></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: "f2855aea6b054271be928e64ad386da0", divId: "adobe-dc-view" });
        adobeDCView.previewFile({
            content: { location: { url: "https://cookbooks.vintagecooking.live/pdf/test.pdf" } },
            metaData: { fileName: "test.pdf" }
        }, {});
    });
</script>

 

 

 

 

Error1.pngError2.png 

Topics

View SDK

Views

437

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

File preview not available, please reload to try again. - Azure

Community Beginner ,
Mar 01, 2020

Copy link to clipboard

Copied

I am running Azure with Blob Storage. I created credentials for my domain and my subdomain. My subdomain is the blob storage. No matter which credential I use I get the error "File Preview Not Available"

 

<div id="adobe-dc-view"></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: "f2855aea6b054271be928e64ad386da0", divId: "adobe-dc-view" });
        adobeDCView.previewFile({
            content: { location: { url: "https://cookbooks.vintagecooking.live/pdf/test.pdf" } },
            metaData: { fileName: "test.pdf" }
        }, {});
    });
</script>

 

 

 

 

Error1.pngError2.png 

Topics

View SDK

Views

438

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
Mar 01, 2020 0
Adobe Employee ,
Mar 05, 2020

Copy link to clipboard

Copied

Looks like file location (https://cookbooks.vintagecooking.live/pdf/test.pdf) which you have provided in the code snippet is not reachable. If for a valid file location you keep getting the error then please do let us know. Thanks.

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
Reply
Loading...
Mar 05, 2020 0
Community Beginner ,
Mar 05, 2020

Copy link to clipboard

Copied

Thank you for the reply. I believe I figured out the solution. https://cookbooks.vintagecooking.live was a blob container I created in Azure to hold my files. I don't think Document SDK recognizes subdomains. Because for testing purposes, I created this http://vintagecooking.live/test.html and it works fine. 

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
Reply
Loading...
Mar 05, 2020 0
Adobe Employee ,
Mar 06, 2020

Copy link to clipboard

Copied

Thanks for the update, its good to know that it worked for you. SDK do recongnizes subdomains but browser do put some restrictions while downloading file content, for example around CORS means if file serving domain is different from where it is used then CORS need to be enabled while serving the file. 

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
Reply
Loading...
Mar 06, 2020 1