I'm dealing with mime types and max file sizes for an uploader, and improving error messages. Instead of relying on the file name to detect the mime type, I'm using the file binary header instead to reject dodgy files (for ex a `sample.jpg` file that is actually a ZIP or EXE under the hood).
Are you doing