Each MIME type may have the following attributes:
MIME Type Attribute | Description |
---|---|
type | The MIME type unique name (mandatory). |
extensions | A comma separated list of file extensions mapped to this MIME type (mandatory). |
index | True if this MIME type should be indexed for archive searching (valid only for supported archive files). |
archive | True if this MIME type is a browsable archive. |
viewable | True if this MIME type can be viewed as a text file inside Artifactory UI. |
syntax | The UI highlighter syntax to for this MIME type (only relevant if this is a |
css | The css class of a display icon for this mime type. |
Example of mimetype.xml
<mimetypes version="4"> <mimetype type="text/plain" extensions="txt, properties, mf, asc" viewable="true" syntax="plain"/> <mimetype type="text/html" extensions="htm, html" viewable="true" syntax="xml"/> <mimetype type="text/css" extensions="css" viewable="true" syntax="css"/> <mimetype type="text/xsl" extensions="xsl" viewable="true" syntax="xml"/> <mimetype type="text/xslt" extensions="xslt" viewable="true" syntax="xml"/> <mimetype type="text/x-java-source" extensions="java" viewable="true" syntax="java"/> <mimetype type="text/x-javafx-source" extensions="fx" viewable="true" syntax="javafx"/> </mimetypes>
For example, from the extensions parameter in the above mimtypes.xml file sample we can conclude that:
test.properties is a text/plain MIME
typetest.css is a text/css MIME
typetest.doc
is anapplication/octet-stream
MIME type since doc is not included in any of the other MIME types.
IMPORTANT: Make sure you restart Artifactory for your changes to take affect.
Artifactory MIME Types
Some of the Mime-Types specified in mimetypes.xml
(e.g. application/x-checksum) are used by Artifactory. Great care should be taken before changing these Mime-Types to ensure Artifactory continues to function correctly.