Class AttachmentClass

Namespace
ESRI.ArcGIS.Geodatabase
Assembly
ESRI.Server.Geodatabase.dll
[ClassInterface(ClassInterfaceType.None)]
[Guid("6BB22B36-EEF6-4945-83DB-0BE9D010CF6B")]
public class AttachmentClass : Attachment, IAttachment
Inheritance
AttachmentClass
Implements
Inherited Members

Constructors

AttachmentClass()

public AttachmentClass()

Explicit Interface Implementations

AttachmentID

ID that uniquely identifies the attachment.

virtual long AttachmentID { get; }

Returns

long

ContentType

Content type that describes the attachment data.

virtual string ContentType { get; set; }

Returns

string

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

Data

Attachment data.

virtual IMemoryBlobStream Data { get; set; }

Returns

IMemoryBlobStream

GlobalID

Global ID that uniquely identifies the attachment.

virtual string GlobalID { get; }

Returns

string

Name

Name of the attachment.

virtual string Name { get; set; }

Returns

string

Remarks

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

ParentGlobalID

Parent global ID to which the attachment belongs.

virtual string ParentGlobalID { get; }

Returns

string

ParentID

Parent ID to which the attachment belongs.

virtual long ParentID { get; }

Returns

long

Size

Size of the attachment data in bytes.

virtual int Size { get; }

Returns

int

Value[esriAttachmentTableField]

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

virtual object Value[esriAttachmentTableField key] { get; }

Parameters

key esriAttachmentTableField

Returns

object