Detect MIME type from leading bytes. Exported for unit tests.
Recognises: JPEG, PNG, GIF, WebP, MP4/MOV (ISO BMFF "ftyp"), WebM/Matroska.
The downloaded bytes.
A canonical MIME (image/png, video/mp4, ...) or null if no signature matches. Caller falls back to the declared Content-Type.
image/png
video/mp4
null
Content-Type
Detect MIME type from leading bytes. Exported for unit tests.
Recognises: JPEG, PNG, GIF, WebP, MP4/MOV (ISO BMFF "ftyp"), WebM/Matroska.