Get the App
SLTechnology News&Howtos  ›  Network Security  › 

Comparison between file extension (suffix) and MINE-type

Shulou Source: shulou.com Published: 2022-06-01 04:38:35 10月02日 Update

When judging whether the suffix name is consistent with the file type, two problems need to be solved: one is how to judge the MINE-type of the file according to the content of the file, which can be realized by the magic library that comes with the system; the other is how to judge the corresponding MINE-type according to the suffix name. Apache also gives a solution to this problem, providing a comparison table between the suffix name and MINE-type.

However, there are some differences between the MINE-type provided by Apache and the MINE-type provided by the system's own magic library, and the comparison table provided by the magic library of python is the same as the MINE-type provided by the magic library, and the common suffix is basic cover, so we mainly use the suffix of python and MINE-type comparison table, and add other reference tables to form a custom suffix and MINE-type comparison table.

If there are specific suffixes that need to be added, you can also reorder and integrate them using the python script I provided.

The list in the attachment integrates the suffix-MEME-type list provided by Python mimetypes and the list provided by the following URL:

Http://webdesign.about.com/od/multimedia/a/mime-types-by-file-extension.htm

Attachment: http://down.51cto.com/data/2367642

Tags: Suffixes comparison tables files consistency systems problems attachments integration two between content differences common scheme use type URL script solution extension Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information MariaDB NVidia Shulou Technology Apple