Does Box pdf file support to open in browser instead of force download?
I am using Ruby on rails with boxr gem to integrate box api and I have a requirement to implement the capability where pdf file should default open in the browser when a user tries to download particular pdf file.
Boxr gem provide a method call download_url, which returns download URL and when User clicks on it, it's force the browser to download file instead of open in the browser default viewer.
-
Yes, you can use the embed_url method from the Boxr gem to generate a file preview link. This method takes a Box file id as the parameter and returns back a file preview link. You can preview the file by accessing the link directly or embedding the link into an iFrame.
-
Thanks Murtza for your response, I have to implement the same behavior as pdf file hosted in s3, It opens default in browse using pdf.js viewer. Is there a way to acomplish the same behavior? I have gone through this post https://www.dropbox.com/en/help/201. Please help me if this will work with boxr gem.
サインインしてコメントを残してください。
コメント
2件のコメント