How I look up MIME types when uploads or downloads behave oddly
· 2 min read
A MIME type tells software what kind of content a file or response contains.
The MIME Types tool helps with the mechanical part, but I still check the result before using it somewhere real.
The simple idea
A MIME type tells software what kind of content a file or response contains.
I use the tool to make the transformation visible: input on one side, output on the other, and a quick sanity check before I copy anything.
Step 1: Search by file extension or MIME type
Search by file extension or MIME type.
Step 2: Compare the expected MIME type with the server Content-Type header
Compare the expected MIME type with the server Content-Type header.
Step 3: Check upload allowlists when a file is rejected
Check upload allowlists when a file is rejected.
Step 4: Remember file extensions can be misleading
Remember file extensions can be misleading.
Step 5: Use correct MIME types for downloads and APIs
Use correct MIME types for downloads and APIs.
Step 6: Do not rely on MIME type alone for security validation
Do not rely on MIME type alone for security validation.
Step 7: When serving files, set Content-Type deliberately
When serving files, set Content-Type deliberately.
My checklist
Before I trust the result, I check:
- Search by file extension or MIME type.
- Compare the expected MIME type with the server Content-Type header.
- Check upload allowlists when a file is rejected.
- Remember file extensions can be misleading.
- Use correct MIME types for downloads and APIs.
- Do not rely on MIME type alone for security validation.
- When serving files, set Content-Type deliberately.
Small utilities are useful because they remove repetitive work. They are safest when the output is still reviewed.
Comments
Comments are welcome — please read the comment policy first. Powered by giscus and GitHub Discussions.