gwhelan-esri-ireland-ie-esridist

Get Attachments from a Feature Service with Attachments enabled over SSL

Discussion created by gwhelan-esri-ireland-ie-esridist on Jul 20, 2012
Latest reply on Apr 30, 2013 by gtissington
Hello

I'm stuck on an issue at the moment trying to get attachments from a secured Feature Service.

Basically what I am trying to do is display attachments associated with a record in the popup in an image gallery. I've been able to build a URL based on results of the query and I am using a XMLHttpRequest to get the JSON of the Attachments page for the record.

Example URL:
http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/SanFrancisco/311Incidents/MapServer/0/4388173/attachments?f=json&callback=dojo.io.script.jsonp_dojoIoScript103._jsonpCallback

This returns the JSON object containing the attachment info and then if there are images the URL can be modified to append the file names to use them as the src of the images in the image gallery.

This works fine on non secured services but when I tried to access our live service which is secured with SSL my request is returning an access denied error.

Im not sure what is the best practice to get at the attachments but there doesn't seem to be anything in the API for it, unless I'm missing something.

Has anyone else tired to do this and is there a solution? Or is there a better way of doing it that I am missing?

Thanks in advance,
Graham Whelan

Outcomes