I want to view the attachments of my feature in the JS-API. But I see a gap between the provided samples and the functionality I want to have.
My JS-API application shows several map-services, one of them has an attachment. I have implemented an Identify on all visible map-services, showing the results in a table (not with popups because I needed to have a robust, conservative interface).
The identify doesn't show attachments, even not the info if a feature has an attachment.
The samples in the JS-API use the attachment functionality only in editing scenarios, with the Attachment Editor widget (and there inserting/deleting attachments is solved really trivial. I played around with that and didn't find a way to make it read-only, except hacking the css). Also, you need a feature-service, which I can't do and can't provide.
So, based on my map-services: Which way should I go to view attachments? Is there a path in the JS-API to get to my feature with attachments?
But it's a lot of implementation to do and you have to dig deep in the identify functionality until any response is shown in the interface. Also you have to access the REST-URLs by hand.
Do you know any better solutions? Any implementations how you did that? Did you ever used an additional feature-service that you asked for that?
I appreciate any help and discussion on that topic (and don't bother about my implementation with the tables, because it's also missing for the standard identify widgets). For me it's a missing link to the standard identify in an ArcMap session (where the attachments are listed simply in the identify). Providing the access only with feature-layers and in an editing-workflow is a bit to short, I guess. So: Any idea to get to a workflow for that would be really helpful for all, I hope. 🙂
Though the given example in the above link work successfully. I tried making my own one but for it didn't work. The feature class that has attachment (a photo) is in a File Geodatabase. When click on the link of the attachment in the REST page http://xxx/ArcGIS/rest/services/Testing/JZ_map/MapServer/0/1225/attachments/1, I got the the following error message
Error Server Error - The remote server returned an error: (404) Not Found.
Code: 500
Wondering why? Does the Feature class having attachment needs to be in ArcSDE? Or it's because there's something need to be configured in IIS? Can anyone please provide some suggestion? Thanks.