Add, delete, and download attachments for features from a service.
Tap a feature to load its attachments. Swipe to delete, select to preview, or tap 'Add attachment' to add a new attachment from your photo library.
To get a Feature
from a ServiceFeatureTable
and add or delete Attachment
:
- Create a service feature table from a URL.
- Create a
FeatureLayer
from the service feature table. - Select features from the feature layer,
FeatureLayer.SelectFeatures()
. - To fetch the feature's attachments, cast to an
ArcGISFeature
and useArcGISFeature.GetAttachmentsAsync()
. - To add an attachment to the selected ArcGISFeature, use
ArcGISFeature.AddAttachmentAsync()
. - To delete an attachment from the selected ArcGISFeature, use the
ArcGISFeature.DeleteAttachmentAsync()
. - After a change, apply the changes to the server using
ServiceFeatureTable.ApplyEditsAsync()
.
- ServiceFeatureTable
- FeatureLayer
- GetAttachmentsAsync
- GetDataAsync
- DeleteAttachmentAsync
- UpdateFeatureAsync
- ApplyEditsAsync
Edit and Manage Data