Made the backend give higher precedence to the content type over the ext...

...ension

@SirCmpwn - feel free to merge.

However, it looks like Chrome does not set the proper mimetype when pasting animated images. In fact, it appears to always set image mimetypes to `image/png`.