Alternative to FindMimeFromData method in Urlmon.dll one which has more MIME types

前端 未结 3 1570
夕颜
夕颜 2020-11-29 09:50

The FindMimeFromData method accessible through Windows DLL Urlmon.dll is capable of determining the MIME type of a given data stored in memory, considering the

3条回答
  •  攒了一身酷
    2020-11-29 10:27

    There are multiple possible solutions in this SO post which will at the very least give you some food for thought.

    It seems that the only real way to do it is to read it in binary and then do a comparison, whether the MIME Types are declared hard-coded in some fashion or you rely on the machines own available MIME Types / Registry.

提交回复
热议问题