Skip to main content
Solved

I am getting the error while previewing a file using Content Explorer?




I am using the following references,

href="https://cdn01.boxcdn.net/platform/elements/16.0.0/en-US/explorer.css

src="https://cdn01.boxcdn.net/platform/elements/16.0.0/en-US/explorer.js

Best answer by Niladri

Hi @ostefaniuk,


Yes, we have fixed the issue.

We were using RequireJS library which caused the preview issue.


However, we have fixed the issue by forwarding ‘fixDependencies’ property to Content Preview widget by using ‘contentPreviewProps’ property.


Please find the following code snippet:


var contentExplorer = new Box.ContentExplorer();

contentExplorer.show(folderId, accessToken, {

    container: ".explorer-container",

    contentPreviewProps: {

        fixDependencies: true

    }

});


Regards,

Niladri

View original
Did this topic help you find an answer to your question?

5 replies

ostefaniuk Box

Hello @Niladri, thanks for posting your question. Firstly, could you please use the latest version which is 17.1.0?


https://cdn01.boxcdn.net/platform/elements/17.1.0/en-US/explorer.css

https://cdn01.boxcdn.net/platform/elements/17.1.0/en-US/explorer.js


Could you specify what Frontend framework are you using? Are there any additional errors in the browser console?


Regards,

Olga


  • Author
  • Known Participant
  • 22 replies
  • July 24, 2023

HI @ostefaniuk, Thanks for answering the question. We are using a script that seems to be causing the issue.


Regards,

Niladri


ostefaniuk Box

Hi @Niladri, did you managed to adjust the script you mentioned?


  • Author
  • Known Participant
  • 22 replies
  • Answer
  • September 6, 2023

Hi @ostefaniuk,


Yes, we have fixed the issue.

We were using RequireJS library which caused the preview issue.


However, we have fixed the issue by forwarding ‘fixDependencies’ property to Content Preview widget by using ‘contentPreviewProps’ property.


Please find the following code snippet:


var contentExplorer = new Box.ContentExplorer();

contentExplorer.show(folderId, accessToken, {

    container: ".explorer-container",

    contentPreviewProps: {

        fixDependencies: true

    }

});


Regards,

Niladri


ostefaniuk Box
  • Developer Advocate
  • 39 replies
  • September 6, 2023

Hi @Niladri, Thanks a lot for the update!


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings