Why does the FindMimeFromData function from Urlmon.dll return MIME type “application/octet-stream” for many file types, whereas checking MIME type by file extension (I.e. against windows registry) returns a more precise type?
For example, mp3 is an “application/octet-stream” instead of “audio/mp3”.
Basically, I want to verify an uploaded file with incorrect extension. This method seems to work for many image files, xml, etc.
The question is similar to this one, but the provided solution is not suited for validating uploaded files, because of different/ambiguous MIME types returned.