Fix an issue where images with safe file_types are uploaded and fail because they have an uppercase extension