This document is archived and information here might be outdated. Recommended version. |
ArcObjects namespaces > Geodatabase > ESRI.ArcGIS.GeoDatabase > Interfaces > IA > IAttachment Interface > IAttachment.ContentType Property (ArcObjects .NET 10.4 SDK) |
Content type that describes the attachment data.
[Visual Basic .NET] Public Property ContentType As String
[C#] public string ContentType {get; set;}
[C++]
HRESULT get_ContentType(
BSTR* ContentType
);
[C++]
HRESULT put_ContentType(
BSTR ContentType
);
[C++]
Parameters ContentType [out, retval] ContentType is a parameter of type BSTR ContentType [in] ContentType is a parameter of type BSTR
The ContentType property must be populated with the full MIME type name as would be used in an HTTP request for the items being attached. The MIME type string should consist of both the type and the subtype and follow the pattern (without the square brackets) of [MIME type name]/[MIME subtype name]. An attached jpeg image would have a MIME type of image, and a MIME subtype of jpeg, yielding a ContentType string of image/jpeg.
Below are a few common examples:
Full MIME Type Name | Common File Extension | Purpose |
---|---|---|
text/html | .html | Web Page |
image/png | .png | PNG-format image |
image/jpeg | .jpeg | JPEG-format image |
audio/mpeg | .mp3 | MPEG Audio File |
The official list can be found at http://www.iana.org/assignments/media-types/index.html