I have an ArcGIS Online hosted feature layer containing point features that have attachments enabled. Could someone help me with some advice for how to use the ArcGIS Online feature reader that will allow me to access the features and their associated attachments (if there are any-not all features have an attachment)? It is easy enough to get the features, but I can't see a way to access the attachments. Thank you!
Reading ArcGIS Online feature attachments
Best answer by mark2atsafe
Looks like build 17475 is the one to use. It has the most recent fixes. See safe.com/beta for the newest betas. The functionality has been checked and verified by the quality team.
@runneals - I don't see any documentation, but according to the notes I have seen there is a new parameter on each reader feature type. It's called 'Include Attachments' and defaults to No (in case you're wondering, it's quicker and more backwards compatible to not default to yes).
So, if you set that, it should return features with the following format attributes:
New format attributes on all features:
- arcgisonline_objectid (always)
- arcgisonline_globalid (when globalids present)
New format attributes for attachments, present on features that have attachment(s):
- arcgisonline_attachment{}.id
- arcgisonline_attachment{}.globalid
- arcgisonline_attachment{}.size
- arcgisonline_attachment{}.name
- arcgisonline_attachment{}.content_type
- arcgisonline_attachment{}.data
So it looks to me like the attachment will be in the form of a data attribute, which you could then write to an output file using the AttributeFileWriter transformer.
Let me know if this doesn't help and I can investigate further,
Regards
Mark
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.