pdf file should not force download instead of open in the browser

I am using Ruby on rails with boxr gem to integrate box api, and I have to implement a capability where the pdf file should default-open the browser when a user tries to download a pdf file.

Boxr gem provide a method call download_url, which forces the browser to download file instead of open in the browser.


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.

Need Your Help