You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: Edit Feature Attachments/README.md
+5-4
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,11 @@
1
1
2
2
## Add, delete, and fetch attachments for a specific feature in a feature service.
3
3
4
-
This sample demonstrates the following:
5
-
- Click or tap on a feature to show its callout. The callout specifies the number of attachments for that particular feature.
6
-
- Selecting on the info button inside the callout shows the list of those attachments.
7
-
- In the list you can add a new attachment by selecting the + button. You can delete an attachment by selecting an attachment and selecting the - button.
4
+
Click or tap on a feature to show its callout. The callout specifies the number of attachments for that particular feature. Selecting on the info button inside the callout shows the list of those attachments. In the list, you can add a new attachment by selecting the + button. When clicking on the + button, a native document picker will open, which is invoked by DocumentDialog from AppFramework Platform plugin. You can delete an attachment by selecting an attachment and selecting the - button. This is all controlled through the attachment list model, which is obtained through the feature. The attachment list model works similarly to other QML models and can be directly fed into a list view for easy display and user interaction.
5
+
6
+
By default, fetchAttachmentInfos is called automatically for the selected feature, which will request the attachment info JSON from the service. This JSON contains information such as name (the file name) and attachmentUrl (the URL to the file data.)
7
+
8
+
To edit the attachments, call addAttachment or deleteAttachment on the AttachmentListModel. By default, edits are automatically applied to the service and applyEdits does not need to be called.
0 commit comments