Author Topic: Content-Type for forum attachments  (Read 1831 times)

0 Members and 1 Guest are viewing this topic.

Offline johnwaTopic starter

  • Frequent Contributor
  • **
  • Posts: 255
  • Country: au
    • loopgain.net - a few of my projects
Content-Type for forum attachments
« on: January 03, 2014, 01:44:53 am »
Hi Dave,

I have a small suggestion for a possible improvement of the forum. It has come to my attention that the server is sending a Content-Type: header of application/octet-stream for all attachments to posts - see the thread at https://www.eevblog.com/forum/projects/another-kit-all-discrete-power-supply/msg0/?topicseen. It appears that this may be causing problems for some readers.

The other alternative would be to configure the server/forum software to send an appropriate Content-Type, presumably based on the extension of the file. (I think it should be application/x-pdf or something similar  for the file in question). However, apart from any issues with reconfiguring the software, I am not entirely sure which is the best approach. I think the application/octet-stream type acts as a suggestion to save the file, though the browser is free to ignore this.

Perhaps other readers may be able to comment on the advantages and disadvantages of each approach. I did a bit of searching, it appears that other people have also experienced this problem:
https://www.eevblog.com/forum/news/attached-jpg's-wont-open-within-firefox/

On a related note, it appears that the video downloads from www.eevblog.com are being served up with a Content-Type: of text/plain, which definitely suggests a misconfiguration somewhere - I expect quite a few visitors will have their browser windows filled with random binary garbage if they try to use the download link.

All the best for 2014 - I am keen to see what you have in store!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf