Attachments from feature layer service not displaying in my JavaScript application.

Discussion created by louchios on Apr 22, 2014
Hi. I just want to view the attachments of a feature service available online. I do not want to edit, delete, or add attachments.

If I open the feature service using AGOL I am able to view the attachment link when clicking on the point. However, if I try to add the feature service to my JS application, I cannot get the link to the attachments to display. Other fields display correctly.

 function createFeatureLayer(layer) {
    var infoTemplate = new esri.InfoTemplate(
    var feature = new esri.layers.FeatureLayer(layer.url, {
   infoTemplate: infoTemplate,
          mode: esri.layers.FeatureLayer.MODE_ONDEMAND,
   outFields: ["*"],
          hasAttachments: true
  attachmentEditor = new esri.dijit.editing.AttachmentEditor({}, dojo.byId("content"));
  feature.on("click", function(evt) {
   map.infoWindow.show(evt.screenPoint, map.getInfoWindowAnchor(evt.screenPoint));

    return feature;

Thank you for any help.