Fixed a MIME check bug on file uploads