Interface IAttachment
- Namespace
- ESRI.ArcGIS.Geodatabase
- Assembly
- ESRI.Server.Geodatabase.dll
Provides access to members of an attachment.
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[Guid("475E3D30-5478-46C2-9547-09AA7076DCE6")]
public interface IAttachment
Properties
AttachmentID
ID that uniquely identifies the attachment.
long AttachmentID { get; }
Property Value
ContentType
Content type that describes the attachment data.
string ContentType { get; set; }
Property Value
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.
IMemoryBlobStream Data { get; set; }
Property Value
GlobalID
Global ID that uniquely identifies the attachment.
string GlobalID { get; }
Property Value
Name
Name of the attachment.
string Name { get; set; }
Property Value
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.
string ParentGlobalID { get; }
Property Value
ParentID
Parent ID to which the attachment belongs.
long ParentID { get; }
Property Value
Size
Size of the attachment data in bytes.
int Size { get; }
Property Value
Value[esriAttachmentTableField]
Get the value of a member of the attachemnt by name.
object Value[esriAttachmentTableField key] { get; }