mysociety / popit

DEPRECATED - Development on PopIt has stopped and it is no longer being maintained
https://goo.gl/Vvej4Q
Other
76 stars 33 forks source link

the mime type of uploaded images should be detected (e.g. with libmagic) #810

Closed mhl closed 9 years ago

mhl commented 9 years ago

Currently, if you don't manually specify the MIME type of an image when uploading it, it'll be served back with content-type undefined (a bug in itself, since unknown type should probably be served as application/octet-stream). Most browsers will display the image anyway, but the image proxy doesn't like this, so you'll get broken images on a page like:

Since 162596503782ed PopIt depends on mmmagic anyway, so it could be used to detect the MIME type and set mime_type on an image on upload if it's not supplied.