Skip to main content
Solved

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

  • July 24, 2023
  • 5 replies
  • 451 views
  • Translate All


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

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

Translate

  • Author
  • Known Participant
  • July 24, 2023

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

Regards,
Niladri

Translate

ostefaniuk Box

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

Translate

  • Author
  • Known Participant
  • 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

Translate

ostefaniuk Box

Hi @Niladri, Thanks a lot for the update!

Translate