Select to view content in your preferred language

Arcgis.com hosted feature service with attachments, I want the URL for the attachments list

258
4
02-10-2026 08:52 AM
BradGeorgic
Regular Contributor

I have a hosted Feature Service on ArcGIS.com with attachments enabled.  There are 50+ features.  I want to make a list of the URLS for the attachments with that also shows a Name field from the feature class.

Situation is that I don't want to host the attachment separately somewhere else in order to link on a webpage.

 

QueryAttachments works only for 1 ObjectID at a time....too slow.

0 Kudos
4 Replies
ToddW_stl
Esri Contributor

where do you want this list of attachment urls?  is it in a webmap, Excel file, other format, etc?

0 Kudos
BradGeorgic
Regular Contributor

excel would be best, but I could use parsed out txt etc.  Thanks

0 Kudos
ToddW_stl
Esri Contributor

I can't look at this more until later, but you could try something like this to loop through features to get attachments, then loop through attachments within each feature to get the urls, then output each url to a new excel row.

https://developers.arcgis.com/python/latest/guide/using-attachments-with-feature-layers/ 

0 Kudos
BradGeorgic
Regular Contributor

So I used the REST endpoint and QueryAttachments.  In the ObjectID Field I listed the numbers with commas between(1,2,3....)  and it spit out the information I needed.  Wish I could use a range with hyphen - (1-56).  My problem is solved