About MIME types
Some Content Engine objects have an associated Multipurpose Internet Mail Extension (MIME) type. MIME is a standard protocol for identifying the data type of a file. For a Content Engine object, the MIME type identifies the type of content that is associated with the object. The MIME type allows you to manually or programmatically determine the appropriate application for displaying or editing the content. You can also use the MIME type of a newly added document as a means for automatically selecting a class for the document. For information about document classification, see Automatic document classification.
The following objects have an associated MIME type:
- Content elements (Content Type property)
The Content Type property indicates the MIME type for a content transfer element or a content reference element. A content transfer element represents Content Engine managed content, whereas a content reference element represents externally managed content. For more information about content elements, see Document content.
- Documents and annotations (Mime Type property)
The Mime Type
property indicates the MIME type for a document or annotation as a whole. This MIME type can be different from the MIME type of any of the content elements that belong to the document or annotation.
After you check in a document, you cannot change the value of any MIME type property associated with the document. Specifically, the Content Type and MIME Type properties become read-only on the following objects: the checked-in document, any annotations associated with the document, and any content elements that belong to the document or associated annotations. Conversely, before or during document check in, you can assign a MIME type to those objects. An explicit MIME type assignment prevents or overrides the default MIME type assignment performed by either Content Engine or Enterprise Manager. For information about changing MIME types on document checkin, see Check in content window. For information about viewing the MIME type of content elements, see Document properties (Content Elements tab).
Content Engine default MIME type assignment
When you check in a document, Content Engine potentially assigns a default MIME type to the following objects:
- Content transfer elements (Content Type property)
A content transfer element is assigned a default MIME type if the element has no MIME type (the value of the Content Type property is empty). The MIME type assigned is one of the following:
- MIME type associated with the Retrieval Name property
If the Retrieval Name property specifies a file name with an extension, Content Engine searches the mimetypes.properties file for the MIME type mapped to that extension. This mapped MIME type, if found, is the default MIME type assigned. For example, the Retrieval Name for a content transfer element might be abc.txt. (You can optionally set the Retrieval Name to be the name of the original content file.) Content Engine finds the MIME type mapped to the .txt extension and assigns that mapped type as the default MIME type. For information about editing the mimetypes.properties file, see Associating a MIME type with a file extension.
- application/octet-stream
Content Engine assigns application/octet-stream as the default MIME type if the determination of the associated MIME type for the Retrieval Name property fails. This failure occurs when the property does not specify a file name extension or when no mapped MIME type can be found for the extension.
- Documents and annotations (Mime Type property)
A document or annotation object is assigned a default MIME type if the object has these attributes: no MIME type (the MIME type property is empty) and one or more content elements. The MIME type assigned is the MIME type of the first content element for the object (as specified by the Content Type property for the element). The MME type for the first content element might be one that Content Engine has assigned: Content Engine assigns any needed default MIME types to content transfer elements before doing so for documents or annotations.
No default MIME type is assigned to content reference elements. Document checkin fails with an error if the document has one or more content reference elements with no MIME type.
As discussed in this section, Content Engine potentially assigns a default MIME type to a document, annotation, or content transfer element. Before document checkin, an application can also potentially assign a MIME type. From an application point of view, these application-supplied MIME types are default MIME types. Specify the MIME type directly to avoid the possibility of Content Engine or an application assigning an incorrect MIME type by default. (The application in question might be a FileNet tool such as Enterprise Manager or any custom application.)
Enterprise Manager default MIME type assignment
When you use the Create New Document wizard, Enterprise Manager potentially assigns default MIME types to the following objects:
- Content elements (Content Type property)
A content element is assigned a default MIME type when you add the element to a document. The MIME type assigned is one of the following:
- MIME type associated with the user-specified file name
If the user specifies a file name with an extension, Content Engine searches the Windows® registry for the MIME type mapped to that extension. This mapped MIME type, if found, is the default MIME type assigned. For example, you might enter abc.txt as the file name. Enterprise Manager finds the MIME type mapped to the .txt extension and assigns that mapped type as the default MIME type.
- User-specified file name extension
Enterprise Manager assigns the file name extension (if any) as the default MIME type if no mapped MIME type can be found for the extension.
- Documents (Mime Type property)
A document is assigned a default MIME type when you add a content element to the document and the document has no MIME type. The MIME type assigned is the MIME type of the added element (as specified by the Content Type property for the element). The MIME type of the added element might be one that Content Engine has assigned.