Roundcube Community Forum

Release Support => Pending Issues => Topic started by: Drakon on January 22, 2013, 10:34:46 AM

Title: Unable to display an PDF file attached, only download it
Post by: Drakon on January 22, 2013, 10:34:46 AM
Hi crew!

Normally I have e-mails with PDF attached. Internally I have: Content-Type: application/pdf; name="name_of_file.pdf". If I click on the attachment my browser (Google Chrome) opens a new window and show the content of PDF file embedding it. It's OK.

Sometimes I receive e-mails with PDF attached and internally I have: Content-Type: application/octet-stream; name="name_of_file.pdf" and I cannot preview on a new window, only download. If I change "application/octet-stream" by "application/pdf" works fine and the browser opens the file in a new window.

Can you fix the problem?

Regards.
Title: Re: Unable to display an PDF file attached, only download it
Post by: SKaero on January 22, 2013, 11:56:41 AM
Thats the way its suppose to work.
Title: Re: Unable to display an PDF file attached, only download it
Post by: Drakon on January 24, 2013, 09:07:25 AM
I supose that Roundcube needs to differentiate between "application/octet-stream" with filename with PDF/JPG/PNG... file extensions and "application/octet-stream" with others.

Ideally that Roundcube replaces "application/octet-strem" with PDF/JPG/PNG.. by "application/pdf" or ".../jpg", or ".../png", etc because if I change "application/octet-stream" by "application/pdf" with a text editor Roundcube works fine and opens the attachment in a new window.

It would be nice fix this...