File preview feature
Hi,
I am new to Box, please help me how to approach for file preview feature. I have created a file in my box developer account, i would like to preview that file using Box Java SDK and developer token.Please guide me in right direction.
Thanks,
Sonal
-
Hey - thanks for reaching out. There are two ways you can do this.
- The first is to embed the file preview as an iframe. Box allows you to obtain a URL that you can use to display a file within an iframe. You can find that method in the Java SDK here: https://github.com/box/box-java-sdk/blob/master/doc/files.md#get-an-embed-link
- The second (and more robust) is to use the Box Content Preview UI Element, which is a Javascript library for displaying file previews in the client. Using Content Preview, you can initialize the library and provide an access token (in this case, your developer token) and a file ID and then a file preview will display. You can see more details for using Box Content Preview here: https://developer.box.com/docs/box-content-preview
Please let me know if you have any additional questions!
Please sign in to leave a comment.
Comments
2 comments