Author Topic: Unable to display an PDF file attached, only download it  (Read 4567 times)

Offline Drakon

  • Jr. Member
  • **
  • Posts: 45
Unable to display an PDF file attached, only download it
« 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.

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,882
    • SKaero - Custom Roundcube development
Re: Unable to display an PDF file attached, only download it
« Reply #1 on: January 22, 2013, 11:56:41 AM »
Thats the way its suppose to work.

Offline Drakon

  • Jr. Member
  • **
  • Posts: 45
Re: Unable to display an PDF file attached, only download it
« Reply #2 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...