Some 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 Platform 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.
The following objects have an associated MIME type:
The Content Type property indicates the MIME type for a content transfer element or a content reference element. A content transfer element represents Content Platform Engine managed content, whereas a content reference element represents externally managed content. For more information about content elements, see Document content.
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 Content Platform Engine.
When you check in a document, Content Platform Engine potentially assigns a default MIME type to the following objects:
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 options:
If the Retrieval Name property specifies a file name with an extension, Content Platform 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 Platform 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.
Content Platform 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.
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 MIME type for the first content element might be one that Content Platform Engine has assigned: Content Platform 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 check-in fails with an error if the document has one or more content reference elements with no MIME type.
Content Platform Engine potentially assigns a default MIME type to a document, annotation, or content transfer element. Before document check-in, 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 Platform Engine or an application assigning an incorrect MIME type by default. (The application in question might be a custom application.)
When you use the Create New Document wizard, MIME types are assigned to the following objects:
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 options:
If the user specifies a file name with an extension, Content Platform 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. Content Platform Engine finds the MIME type mapped to the .txt extension and assigns that mapped type as the default MIME type.
The file name extension (if any) is assigned as the default MIME type if no mapped MIME type can be found for the extension.
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 Platform Engine has assigned.