send_file, pdf and inline option. Can't display in browser

hey all

i'm trying to send a pdf to the browser, to display inline, like this:

        send_file("#{RAILS_ROOT}/tmp/#{filename}",
            :filename => filename, :disposition => "inline")

But, it keeps coming through as a downloadable attachment rather than
being shown in the browser. I don't think it's my firefox settings
because when i go to other pages that have pdf links then they're shown
inline, eg

http://www.thefms.org/wp-content/uploads/2009/05/fms-programme_lr.pdf

Can anyone see the problem?

thanks
max

hey all

i'm trying to send a pdf to the browser, to display inline, like this:

    send\_file\("\#\{RAILS\_ROOT\}/tmp/\#\{filename\}",
        :filename => filename, :disposition => "inline"\)

But, it keeps coming through as a downloadable attachment rather than
being shown in the browser. I don't think it's my firefox settings
because when i go to other pages that have pdf links then they're shown
inline, eg

Try supplying the content type

Fred

Frederick Cheung wrote: