File name extension (suffix) vs. Mine-type

Source: Internet
Author: User
Tags comparison table

In judging the suffix name and file type is consistent, need to solve two problems, one is how to judge the file content according to the file Mine-type, this can use the system comes with the Magic Library implementation, and the second is how to judge the corresponding Mine-type according to the suffix name, The problem is that Apache also gives a solution, providing a comparison table of suffix names and mine-type.

However, there is a difference between the mine-type provided by Apache and the Mine-type provided by the system's own magic library, while the Python Magic Library provides a comparison table with the Mine-type provided by the Magic Library, and the common suffix is basically cover. Therefore, the use of Python suffix and mine-type table-based, adding the other table to form a custom suffix and mine-type table.

If there is a specific suffix that needs to be added, you can also use the Python script I provided to reorder them together.

The list in the attachments incorporates the suffix-meme-type list provided by Python mimetypes and a list of the following URLs:

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

This article is from the "7499511" blog, please be sure to keep this source http://7509511.blog.51cto.com/7499511/1768553

File name extension (suffix) vs. Mine-type

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.