mysociety / popit

DEPRECATED - Development on PopIt has stopped and it is no longer being maintained

Home Page:https://goo.gl/Vvej4Q

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

mhl opened this issue · comments

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 1625965 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.