How to open Pdf or doc file in firefox

Hello champs,

Currently i have given a link to my document as like:-
‘/controller/action/holidaylist.xls’ and i have placed this file in my
own created directory ‘ABC’ at RAILS_ROOT only.

And in my controller, i have written like:-

send_data(File.read("#{RAILS_ROOT}/ABC/" + file_name),
:file_name => file_name
:disposition => “inline”)

Now whenever i clicked it, my firefox browser prompts a window to open
it. That is something i do not want. I want to view it in browser only…

Can someone light me some direction over it so that i can move forward
… ?

On 25 March 2010 13:17, Hemant B. [email protected] wrote:

       :disposition => "inline")

Now whenever i clicked it, my firefox browser prompts a window to open
it. That is something i do not want. I want to view it in browser only…

Can someone light me some direction over it so that i can move forward

In the prompt window in FF there should be a checkbox ‘Do this
automatically for files like this from now on’ or something similar.
Check that and the file should open without prompting.

Colin

Colin L. wrote:

On 25 March 2010 13:17, Hemant B. [email protected] wrote:

� � � � � �:disposition => “inline”)

Hello colin,

Thanks for a quick reply. But i do not want this to be happen in my
firefox only. I want this to be happen in every application which are
using my application…

Hope you got me right…
And yes i got to know that there are so many ways with which you can
configure this on your machine only.

Colin is right. After googling it (
firefox view pdf in browser - Google Search) found the
following page:
http://support.mozilla.com/en-US/kb/opening+PDF+files+within+Firefox .

/Lasse

2010/3/25 Colin L. [email protected]

On 25 March 2010 15:32, Hemant B. [email protected] wrote:

Hope you got me right…
And yes i got to know that there are so many ways with which you can
configure this on your machine only.

As far as I know this cannot be done. All you can do is to send the
pdf file. It is up to the browser to decide what to do with it. I
may be wrong though.

Colin