Adding custom MIME types

About this task

Perform the following steps to add PolicyCenter support for a new MIME type (Multipurpose Internet Mail Extension).

Procedure

  1. If necessary, add the MIME type to the configuration of the application server. This step is dependent on the configuration requirements of the application server.
    For example, Tomcat stores MIME type information in the web.xml configuration file in a series of <mime-mapping> tags. Verify that the needed MIME type exists in the appropriate file. If necessary, add it.
  2. Add the new MIME type to the PolicyCenter config.xml file in the <mimetypemapping> section.
    • For the name attribute, specify the name of the MIME type, such as text/plain.
    • For the extensions attribute, specify the file extensions used by the MIME type. If the MIME type is used by more than one file extension, separate each extension with a “|” character. PolicyCenter uses this information to associate MIME types and file extensions. If retrieving a file extension from a MIME type, PolicyCenter uses the first extension in the list. If retrieving a MIME type from a file extension, PolicyCenter uses the first <mimetype> entry associated with the extension.
    • For the icon attribute, specify the image to use for documents of the MIME type. For example, Tomcat assumes the images are stored in the tomcat/webapps/pc/resources/images directory.
  3. Create a description for the MIME type. The description is stored in the displaykey files. The definition has a prefix of Mimetype. (notice the prefix-terminating period) followed by the MIME type name attribute specified in the type’s definition in the config.xml <mimetypemapping> section. Any non-alphanumeric character in the name must be replaced with an underscore character. For example, the text/plain MIME type would have a displaykey description of Mimetype.text_plain.