I have a small nonprofit using arc pro and arc online. We are make a survey123 survey to have the public collect data on chestnut tree locations, observations about health, harvest etc. It might be possible to have dedicated participants get their own free arcgis online accounts, but we are unable to have more org accounts beyond me, the director.
We would like to make it possible for collecting photos, but I'm aware of the credit cost for hosting what might potentially be thousands of photos. I'm looking for a solutions.
Is the following possible, if not, what would be alternative solutions:
- I'm imagining we have them take the photos
- use a web hook via make.com to run a script that
- removes the photo from the feature, transfers it... somewhere? (google drive, AWS storage, somewhere...)
- inserts the url into the feature
I'm on the right right track here? I'm not a developer or more then a beginner at programming. Is there an easier solution?
Director, Build Soil
this is definitely possible and I have executed almost all the points you made, but without the "remove attachment from feature" thing.... all with make.
thank you for your reply,
just to understand, you are saying all the steps work, but you haven't removed an attachment from a feature? or do you mean that isn't possible?
no, it's absolutely possible, just in my workflow i don't need that. you just need to understand that the attachments are stored in a different kind of cloud, for that they are linked to each other by connection table and you need to trace those links backwards and resolve them via a function (then you get the corresponding OBJECTID and then you can delete the attachment).
the function would be this query attachments ... within this function there is the possibility to output the end address (Return Url:), so you get the url of the image and about this in turn you could delete (or copy) the attachment with https://developers.arcgis.com/rest/services-reference/enterprise/delete-attachments.htm. where I just see that it is even easier, because you have to pass in the address only FID and then still have to specify which attachemnt id must be deleted.
i have it tested for you and it works ...... the rest api are [your.service.url]/FeatureServer/0/[OBJECTID with Attachment]/deleteAttachments? .... Query String are - token / token .... f/json .... and attachmenIds / [OBJECTID from the QueryAttachment Function] ..... and works
thank you so much - i'll report back when I go through this!
Assuming you have a website somewhere that may be a good place.
Hope that helps