IAttachment Interface

Provides access to members of an attachment.

Members

Name Description
Read-only property AttachmentID ID that uniquely identifies the attachment.
Read/write property ContentType Content type that describes the attachment data.
Read/write property Data Attachment data.
Read-only property GlobalID Global ID that uniquely identifies the attachment.
Read/write property Name Name of the attachment.
Read-only property ParentGlobalID Parent global ID to which the attachment belongs.
Read-only property ParentID Parent ID to which the attachment belongs.
Read-only property Size Size of the attachment data in bytes.
Read-only property Value Get the value of a member of the attachemnt by name.

IAttachment.AttachmentID Property

ID that uniquely identifies the attachment.

Public ReadOnly Property AttachmentID As Long
public long AttachmentID {get;}

IAttachment.ContentType Property

Content type that describes the attachment data.

Public Property ContentType As String
public string ContentType {get; set;}

Remarks

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

IAttachment.Data Property

Attachment data.

Public Property Data As IMemoryBlobStream
public IMemoryBlobStream Data {get; set;}

IAttachment.GlobalID Property

Global ID that uniquely identifies the attachment.

Public ReadOnly Property GlobalID As String
public string GlobalID {get;}

IAttachment.Name Property

Name of the attachment.

Public Property Name As String
public string Name {get; set;}

Remarks

The name property should be identical to the name of the attached file. This means no special characters or spaces should be used.

IAttachment.ParentGlobalID Property

Parent global ID to which the attachment belongs.

Public ReadOnly Property ParentGlobalID As String
public string ParentGlobalID {get;}

IAttachment.ParentID Property

Parent ID to which the attachment belongs.

Public ReadOnly Property ParentID As Long
public long ParentID {get;}

IAttachment.Size Property

Size of the attachment data in bytes.

Public ReadOnly Property Size As Integer
public int Size {get;}

IAttachment.Value Property

Get the value of a member of the attachemnt by name.

Public Function get_Value ( _
    ByVal key As esriAttachmentTableField _
) As Object
public object get_Value (
    esriAttachmentTableField key
);

Classes that implement IAttachment

Classes Description
Attachment .

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.