AnsweredAssumed Answered

Manually adding attachments

Question asked by canadajebus on Aug 4, 2015
Latest reply on Aug 4, 2015 by canadajebus

Good morning,


I am attempting to add attachments to my feature layer but have encountered a problem.  I have already successfully implemented code to view and delete existing attachments, and I thought my code was correct to add them, however the error callback function says: "Error: Access is denied."  My feature layer does have editing enabled, and other tools in my app work properly.  I do have the proxy thing working so I don't believe it is that either.  Any suggestions?


// Open the file dialog
featureLayer1.addAttachment(editingFeature.attributes["OBJECTID"], dom.byId("formAttachment"), function()
 // Update the info window's html
 dom.byId("buttonEditAttachment").innerHTML = "Delete";
 dom.byId("spanAttachmentLink").innerHTML = "[link]";
 console.log("Attachement added");
}, function (err)