About file metadata / mime type checker
A file's name can lie about what it is. The checker looks at the file itself to show its real type, size and details.
Why it matters
- A file named photo.jpg may actually be something else.
- Uploads are often validated by type, and a mismatch can cause errors.
- Metadata inside files can reveal authors, devices or locations.
MIME types
A MIME type such as image/png or application/pdf is how browsers and servers describe a file. It is worked out here from the file's first bytes (its 'magic number'), not from the extension.
A worked example
A file named invoice.pdf might really be a different type. The tool reads the first bytes: a real PDF begins with %PDF, a PNG with the bytes 89 50 4E 47, a JPEG with FF D8 FF and a ZIP with 50 4B. If the type does not match the name, treat the file with suspicion.
Why it matters
Attackers sometimes disguise one file type as another. Checking the real type is a quick way to verify uploads and email attachments before you open them.
