ArcGIS Server assigns wrong MIME types to image attachments of hosted feature layers

06-28-2019 09:25 AM
Status: Open
New Contributor III

It seems ArcGIS Server (using 10.7) is assigning MIME type application/octet-stream when clicking pop-up links for photo attachments on hosted feature layers.


Instead of opening a new window/tab and previewing the photo, the browser is opening the download file dialog box. 

This issue only seems to happen on attachments for hosted feature layers. Attachments for feature services present the files as image/jpeg and load into the new tab properly.

I have not tested this out with any other file types but I assume it will handle them the same way.

It would be nice if Server could feed proper MIME types for hosted layers too. Previewing images in the browser window is incredibly important to our workflow. Also, hosted layers represent the best way to create and organize content for our organization. Copying data to the server through feature services just really isn't an option.


1 Comment

I am having the same issue with uploading larger .AVI and .MP4 files.  I have smaller videos under the 10MB Hosted Feature Layer limitation that are working okay, however.  I uploaded these videos using Python.

We want to use these attachments to stream 75-100MB through a browser on an iPad.  On a PC, the download works and the video plays, but when I attempt to click the link inside the browser on Safari it appears it doesn't know what type of file format it is.  Again - smaller videos are working.

Tried downloading and republishing the video with a free video conversion tool but that didn't work either.

{'id': 3792,   'globalId': 'ead1e143-8cba-4174-8588-16e0eab98bd5',   'parentGlobalId': '0fdd68f6-aa78-4911-b7ff-aba5910a931c',   'name': '1MAINcleanouttohouse9-2017mp4',   'contentType': 'application/octet-stream',   'size': 74136144,   'keywords': '',   'exifInfo': None}]

This video upload worked:
 {'id': 1493,   'globalId': 'c5f9329f-63f8-4cb6-9f5b-6d21d5d6e2b3',   'parentGlobalId': '0c7b06e8-e929-4b89-bdc4-ae26cd628499',   'name': '16587.mp4',   'contentType': 'video/mp4',   'size': 4586885,   'keywords': '',   'exifInfo': None}]