AnsweredAssumed Answered

Find attachments using task in JavaScript API

Question asked by hodges@rpsgroup.com on Dec 11, 2014
Latest reply on Sep 25, 2017 by TSolow-esristaff

Hi,

 

Does anyone know if it's possible to search for attachments using a task, or if not, any viable work around?  My requirement is that I want to be able to take a text value from the user and then return any attachments with a filename matching the input (or partially containing the input).  A find task allows you to perform the text search on attributes, but attachments don't seem to be an attribute in this way.

 

The only workaround I can come up with is to return each feature and then make a request to the features endpoint with /attachments?f=json appended and see if a valid attachmentinfo comes back.  This works fine when identifying a small number of features, e.g. where the user has clicked, but isn't viable as a way of searching as it could have to make hundreds or thousands of individual requests.

 

Thanks

Outcomes