In the same vein as the Idea below, adding this option to the writer formats completes the user case of moving attachments from non-ESRI formats from file shares or network shares into the ESRI feature services.
Currently its a 3-step data workflow:
- Create features from the data source to the ESRI feature service, and if necessssary download pictures from URLs, network shares, etc. to a local drive.
- Go to the portal item in AGOL/Portal and Enable Add Attachment. (Option: use or daisy chain an HTTPCaller to query the UpdateDefinition API of the feature service)
- Read features created and the pictures downloaded from Step 1. Merge the two together with a unique ID and use the HTTPCaller to Upload Attachment/s to each feature.
Reference: https://developers.arcgis.com/rest/services-reference/enterprise/add-attachment/
Exceptions:
Need to consider the latency or the completion of the uploading as it may time out due to size of the attachments. Also need to consider failed uploads due to size limitations and supported format.