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
-
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. -
Add the new MIME type to the PolicyCenter config.xml file in the
<mimetypemapping>section.- For the
nameattribute, specify the name of the MIME type, such astext/plain. - For the
extensionsattribute, 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
iconattribute, 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.
- For the
-
Create a description for the MIME
type. The description is stored in the
displaykeyfiles. The definition has a prefix ofMimetype.(notice the prefix-terminating period) followed by the MIME typenameattribute specified in the type’s definition in theconfig.xml <mimetypemapping>section. Any non-alphanumeric character in thenamemust be replaced with an underscore character. For example, thetext/plainMIME type would have adisplaykeydescription ofMimetype.text_plain.
