Attachment viewer - no attachments found

1823
5
11-23-2020 02:20 PM
TórshavnarKommuna
New Contributor II

Hi.

I am trying to get attachment viewer to work with our feature services published from ArcGIS Server (v.10.8). The attachment viewer web app is set up at ArcGIS Online. I remember it was working about 2 years ago, but since then I am not able to get it work again. I am not able to figure it out.

I have created a sample web application, with two point features. Both of them have attachments. The application can be found here. Feature service can be found here

Hopefully someone will be able to help me to solve this issue.

Kind regards
Martin

0 Kudos
5 Replies
ManishPatel
Esri Contributor

Hi @TórshavnarKommuna ,

Thanks for sharing the web app & the feature service. When trying to query attachments for the said layer it returns Invalid URL. Also when I try to add the layer to the map it is unable to add. 

 

ManishPatel_0-1606181639279.png

 

You might want to check if the query attachments is able to return results. This will help to troubleshoot if the features contains attachments. 

 

Once you have the results I think it should ideally be displaying in the web app as well.

Hope this helps.

 

Cheers,

Manish

Cheers,
Manish
TórshavnarKommuna
New Contributor II

Thanks for the tip @ManishPatel

I have published the service using ArcGIS Pro and then it started it to work. But this was just a test service I was trying to setup, after running into problems with another services we have published.

After getting this to work, I have tried again with another feature service, where there is around 2.500 features which have many images in high resolution in attachment table. I am not able to get this service to work with Attachment Viewer Web App.

Each time I try to access the service using the Attachment Viewer Web App, the service stops to respond. I do not know how the Web App is coded, but can it be an issue, that there are too many features containing high resolution images? Is the web app trying to load all the features and its attachements, once it is started.

I have noticed that there are errors coming to server log, which can be accessed from ArcGIS Server site manager:
Error performing query operation Wait time of the request to the service 'service_folder/service_name.MapServer' has expired.

Regards,

Martin

ManishPatel
Esri Contributor

Hi @TórshavnarKommuna ,

 

You are most welcome. I am glad to hear that it helped to resolve your issue. 

 

Talking about the attachments, I havent really explored the underlying code for the web app that is used for Attachment Viewer, but here's the link for your reference:

https://github.com/Esri/attachment-viewer

 

Although I did have a look at the sample app and it does look like it tries to query the service for attachments, that could be one of the possibility that its trying to time out. Which you can overcome by increase the time out on the service but this will have adverse impact on the performance. Ideally the service returns the URL to the attachment so even if it is high resolution or not it would be able to return the response.

 

I would suggest you try to add the service to a Web Map and check if the performance is good and if you are able to view the attachments in the attribute table for the service. 

 

Hope this helps.

 

Cheers,

Manish

______________________________________________________________________________________________

If the answer solved your question or if you found it helpful please mark it accordingly to help others who have the same question.

Cheers,
Manish
0 Kudos
TórshavnarKommuna
New Contributor II

Hey Manish.

Thanks for the additional info.

The service is working fine in AGOL Map viewer and I am able to view the attachments in the attribute table. However, I still have troubles running it in Attachment viewer Web App.

I have set "scale range" to not show points when zoomed out over 1:1000 and I got it to work like this partially. It was showing attachments for the first 20 features. But when I tried again today, it was not working at all. 

@ManishPatel , if you are interested in investigating this further, I could send you a private message with credintials to the service, so you could try. Please let me know if you are interested.

Regards,
Martin.

0 Kudos
ManishPatel
Esri Contributor

Hi Martin,

Sure would love to help with that.

Cheers,
Manish
0 Kudos