Specifies the Multipurpose Internet Mail Extensions (MIME) format string of the content data carried by this content element, indicating the kind of data this content element represents. MIME is a communications protocol that allows for the transmission of data in many forms, such as audio, binary, or video.

You can set the ContentType property of a specific content element when you create it and attach it to a document version. The ContentType property requires a value. If you do not provide a value for the ContentType property of a ContentReference object, an error occurs. By contrast, if you do not provide a value for the ContentType property of a ContentTransfer object, the Content Platform Engine attempts to discover the MIME type of the content data, and automatically sets the property to an estimated MIME type value. However, it is not always possible for the the Content Platform Engine to make a correct determination of the content data that the ContentTransfer object holds. Therefore, IBM recommends that you always set this property to the correct MIME type value when you add the content element. At a minimum, if you do not specify the MIME type value of the ContentType property, ensure that the path specified by the RetrievalName property of the ContentTransfer object contains the correct filename extension for the type of content data.

Although Content Platform Engine does not enforce the format of this property's value, a MIME format string consists of a content type, a content subtype, and an optional parameter in the following format: "content type/subtype[;parameter]", for example, "text/html". Interpretation of the value is up to retrieving applications.

MIME defines the following content types:

  • text: Represent textual information in a number of character sets. A charset parameter may be used (for example, "text/plain;charset=us-ascii"). Some subtypes: plain, html, richtext.
  • image: Represents still images. Some subtypes: jpeg, gif.
  • audio: Represents audio or voice data. Some subtypes: wav, au.
  • video: Represents video data or moving-image data. Some subtypes: mpeg, mp4.
  • message: Encapsulates an entire formatted message. Some subtypes: rfc822, partial, external-body.
  • multipart: Combines several body parts of potentially different types and subtypes. Some subtypes: mixed, alternative, parallel, digest.
  • application: Represents application data (such as executables) or binary data.

The following MIME types are specific to FileNet:

  • application/x-filenet-declarerecordtemplate: Record template.
  • application/x-filenet-external: An object that contains a single ContentReference content element.
  • application/x-filenet-external-is: External Image Services document.
  • application/x-filenet-publishtemplate: Publish template.
  • application/x-filenet-scenariodefinition: Scenario definition document.
  • application/x-filenet-search: Stored search.
  • application/x-filenet-searchtemplate: Search template.
  • application/x-filenet-workflowdefinition: Workflow definition document.

Namespace:  FileNet.Api.Core
Assembly:  FileNet.Api (in FileNet.Api.dll)

ToggleSyntax

Visual Basic (Declaration)
Property ContentType As String
C#
string ContentType { get; set; }
Visual C++
property String^ ContentType {
	String^ get ();
	void set (String^ value);
}
JavaScript
function get_contentType();
function set_contentType(value);

ToggleRemarks

ToggleSee Also