cmaxvv
August 5, 2009, 1:08pm
1
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
The FMS is at the heart of instrumental and vocal music education and strives to ensure that schools, parents and Government understand the value and life-changing potential of music for all children. We work to provide advice, guidance and advocacy...
Can anyone see the problem?
thanks
max
cmaxvv
August 5, 2009, 1:14pm
2
On Aug 5, 12:08 pm, Max W. [email protected]
wrote:
inline, eg
Try supplying the content type
Fred
cmaxvv
August 5, 2009, 1:21pm
3
Frederick C. wrote:
On Aug 5, 12:08�pm, Max W. [email protected]
wrote:
inline, eg
Try supplying the content type
Fred
yeah - i was just about to post this
Never mind, i didn’t set the type - it works with this option added:
:type => "application/pdf"
cheers fred
max