Class Attachment
A file (such as an image or document) attached to a feature in a ServiceFeatureTable or a GeodatabaseFeatureTable.
Inheritance
Namespace: Esri.ArcGISRuntime.Data
Assembly: Esri.ArcGISRuntime.dll
Syntax
public sealed class Attachment
Remarks
Attachments allow you to associate files containing additional information with specific, relevant features. For example, a building inspector could attach a PDF of a permit to a building feature. Attachments are not stored as attributes, rather the attachment data is linked with the feature inside its ServiceFeatureTable or a GeodatabaseFeatureTable.
If a feature table supports attachments (HasAttachments), each feature in the table may
have zero or more attachments. Get a feature's collection of attachments by calling
If a feature allows editing of its attachments (CanEditAttachments value is true
), you can add
to the feature's collection of attachments using AddAttachmentAsync(String, String, Byte[]).
The data must be in one of the supported attachment formats.
You can also update or delete attachments from the ArcGISFeature, as required.
Your app's available memory and storage space may impact the size of attachments you can add to a feature, or retrieve from the feature's collection. Apps that need to work with large attachments should be tested using representative physical devices and sample attachments.
Properties
Name | Description |
---|---|
ContentType | Gets the content type of the attachment. |
HasFetchedData | Gets a value indicating whether data has been retrieved. |
Id | Gets the id of the attachment. |
Name | Gets the name of the attachment. |
Size | Gets the size of the attachment's data in bytes. |
Methods
Name | Description |
---|---|
GetDataAsync() | Asynchronously retrieves attachment's data. |
GetDataAsync(CancellationToken) | Asynchronously retrieves attachment's data. |
Applies to
Target | Versions |
---|---|
.NET Standard 2.0 | 100.3 - 200.6 |
.NET | 100.13 - 200.6 |
.NET Windows | 100.13 - 200.6 |
.NET Android | 200.0 - 200.6 |
.NET iOS | 200.0 - 200.6 |
.NET Framework | 100.0 - 200.6 |
Xamarin.Android | 100.0 - 100.15 |
Xamarin.iOS | 100.0 - 100.15 |
UWP | 100.0 - 200.6 |