MIME types

Top  Previous  Next

Customization > MIME types


 

Description

 

The mime_types.xml replaces the functionality of the MagicMime extensions. It adds the MIME type of standardised media types to the header of streamed files.

It is build via the standard XML and it is very important that the structure is correct. An incorrect structure could cause a system malfunction.

 

To create a new file type just add a new line and add an entry based on the layout like described below.

 

 

 

Sample

 

<?xml version="1.0" encoding="utf-8"?>

<mime_types>

  <category type="audio">

    <mid value="audio/x-midi"/>

    <mp3 value="audio/x-mp3"/>

    <rpm value="audio/x-pn-realaudio-plugin"/>

    ...

  </category>

  <category type="documents">

    ...

    <doc value="application/msword"/>

    <eml value="text/enriched"/>

    <pdf value="application/pdf"/>

    ...

  </category>

  ...

</mime_types>

 

 

 

Node types

 

String

Description

Editable

<mime_types>

</mime_types>

Root node of the document.

forbidden

<category name="...">

</category>

Child node for named category.

 

Attributes:

name = Category name [String]

 

Note: This node is used to group media types into categories for a better overview.

check

<ext value="text/plain"/>

Child node of "category" node.

 

Node name is the file extension of the media type.

 

Attributes:

value = MIME type [String]

 

NOTE: It is very important to add the slash at the end of the XML node otherwise the document will be invalid.

check

 

 

 

 

 



  © 2006 unic8 Studios