FeatureLayer.addAttachment errors

Discussion created by cjmusial on May 13, 2013
I'm using the Javascript API 3.4 and am really having problems getting addAttachment to work.  I'm using the Safari browser on an IPad 5 and have tried several different configurations:

1.  Published the feature class to ArcGis online with attachments enabled.  When the addAttachment method was called, the error callback was invoked with Code=400 and the messgage "Unable to add attachment to the feature".  However when using chrome on a Windows laptop and this exact same web page and script, the attachment was saved fine.

2.  Published the feature class to our local ArcGIS Server, and using proxies since the GIS server is not externally visible.  When the addAttachment method was called, the error callback was invoked with Coe=500 and the message "Unable to load
./proxy.ashx?http:// ...../FeatureServer/0/4414/addAttachment  status:500 ".  I'm able to bring up access this directly from the browser (i.e., http://webserver/wwwroot/proxy.ashx?http://...../FeatureServer/0/4414/addAttachment ), so I know the proxy is set up correctly.  (Also I've disabled the proxy and accessed the web page from an internal address where the proxy isn't needed and got the same error, except it didn't include the proxy in the error message, so it doesn't look like this is a proxy issue).  Does the image get uploaded into a temporary directory where I need privileges?

As a separate issue, when I save an image as an attachment using Chrome on Windows and then bring back that attachment in Safari, it is unable to that image.  It does continue displaying when retrieved from Chrome.  This may or may not be an ArcGIS Javascript API issue, but I thought I'd throw this out in case anyone else has come across it.

If anyone is familiar with these issues and can give me some help, I'd really appreciate it.


Chris Musial