Select to view content in your preferred language

Attachments: downloaded rather than opened in new tab

1332
3
02-21-2023 05:58 AM
agauch
by
Occasional Contributor

We have a problem with the attachments on ArcGIS Server. When we request an attachment, it's downloaded rather than opened in a new browser tab.

This behavior is explained by the http header in the server's response which is the following:
Content-Disposition: attachment; filename="Photo 1.jpg"; filename*=UTF-8''Photo%C2%A01.jpg

On all other ArcGIS Servers (also 10.8.1) where we did the test, the http header is:
Content-Disposition: inline; filename="Photo 1.jpg"
In that case, the file is opened in a new tab.

We can't figure out why ArcGIS Server adds one http header instead of the other.

Tags (1)
3 Replies
Kuyler_JonesCivil
Occasional Contributor

I am experiencing the same issue on ArcGIS Online, when attachments are added through ArcGIS Pro. If I add attachments to the feature layer through ArcGIS Online, it opens in a new tab. If I add the same attachments to the same feature layer via ArcGIS Pro Attributes pane, the attachments are downloaded when I try to open them in ArcGIS Online.

Kuyler_JonesCivil
Occasional Contributor

I have a workaround for this issue.

This is the information provided to me by Esri support:

"... After consulting with some colleagues we were able to find that this issue is tied to a bug that has been reported in the recent update of ArcGIS Pro.

"The bug details are listed below:

"BUG-000157444 - Incorrect content type on attachments added via applyedits [in ArcGIS Pro] with upload ID

"Explanation: When Pro adds attachments to ArcGIS Online the content type is incorrect which causes issues when other applications consume these feature service layers.

"Fortunately, this bug has been reported close to release and is in the product plan to be resolved. You can track the bug's progress within MyEsri as it is now associated with your account. 

"Currently there are two valid workarounds to the issue which include:
1. Manually add the images via the data tab in ArcGIS Online
2. Manually add the images during collection via Field Maps, Survey123, etc..."

I asked them which  is the latest ArcGIS Pro version that did not have the bug and they said:

"...As far as our documentation shows, this issue wasn't appearing in Pro prior to version 3.1..."

I reverted my ArcGIS Pro version to 3.0.5 and the attachments worked properly again. 

0 Kudos
LMedeirosUI
Frequent Contributor

For anyone else that stumbles upon this and goes to the BUG page which only lists "duplicate" as the status, this issue has been fixed (at least for ArcGIS Pro) in 3.2.

For me, this impacted my ability to view images in ExperienceBuilder widgets. I could see that the images had been appended to the new data table, but they were not visible in the page and when I tried to view them in AGOL the link triggered a download instead of opening a new tab in my browser. Same problem, different way it manifested (or at least for my novice terms it seems like it may be).

 

0 Kudos