.docx to .txt, etc.
rename an actual (raster) image to .txt, or a text file to .jpeg or something
so probably not.
well XML is valid text.
it should still stop you from renaming
image.png and uploading it though. If it doesn't, please feel free to open an issue with steps to recreate on the github repo :)
but it's just a mimetype
If you want something a bit more intense you'll probably need to write your own validator, checking magic numbers or something similar (e.g. like GNU
the check is only to assert that the extension is known for that type. But e.g. if a jpeg is listed as a png, and both are
image (i.e. not specific) then that won't fail.
take something a bit more drastic. mime types won't prevent bad file extensions.