Fixed bug where the MIME typ has not been determined correctly when in uppercase