Possible Duplicate:
Is it possible to display an RTF file inside a web page using PHP?
I would like to display .doc files inline on page.
I try to use send_file method in my controller action:
mime_types = {
:doc => 'application/msword',
:docx => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
:pdf => 'application/pdf',
:rtf => 'application/rtf',
:jpg => 'image/jpeg',
:tiff => 'image/tiff'
}
send_file 'c:/sites/efiling2/test.rtf',
:filename => '2',
:type => mime_types[:doc],
:disposition => 'inline'
For pdf files it works, but for doc files browser asks me to open file in Word or to save it on dics.
Is it possible to open doc files inline on page?