Documentation Center

Adding a MIME Type

To upload a resource, Content Delivery must be aware of the resource's MIME type. This procedure describes how to add a MIME type.

About this task

Add MIME types only for resources that Content Delivery supports. For details, see the SDL Knowledge Center Platform Requirements.

Procedure

  1. On the Content Delivery server, edit ContentDelivery_home/mime-types.xml.
  2. To add a new MIME type, follow this syntax:
    <mime-type name="Content type" type="Type">
            <description>Description of content</description>
            <extensions>File extensions</extensions>
        </mime-type>
    where:
    OptionDescription
    Content typeInternet media type of the content, consisting of a type and subtype. In this example, text/xml.
    TypeEither xml or binary.
    DescriptionA brief description of the content. In this example, XML document.
    File extensionsA comma-delimited list of acceptable file extensions for this MIME type. In this example, .xml,.xsd,.rng, and so on.
    To add a file extension to a MIME type, append the file extension to the end of an existing MIME type. For example, to add .myformat files as a text/xml MIME type, add .myformat to the end of the extensions element.
    <mime-type name="text/xml" type="xml">
            <description>XML document</description>
            <extensions>.xml,.xsd,.rng,.mods,.xmp,.xmi,.xconf,.xmap,.xsp,.wsdl,.x3d,.rdf,.owl,.dbx,.tei,.xces,.ead,.xqx,.xform,.gml,.fo,.nvdl,.sch,.imdi</extensions>
        </mime-type>
  3. Save and exit the file.
  4. Restart the application or service.
    1. If you are using a third-party web application server, restart the application server's service. For example, if you are using Apache Tomcat, restart the Apache Tomcat service
    2. If you are using the bundled web application server, restart the Content Delivery database.
      • On Windows, restart the ContentDelivery XML Database service.
      • On Linux, log in as the root user, and type the following at a command prompt:

        /etc/init.d/SDL_LiveContent restart