The only way I have found to do it is using a feature layer with the popup template. If you use these you can add the line showAttachments:true, and an attachment link will show in the bottom of the popup window.var template = new PopupTemplate({
title: "My Title",
fieldInfos: [
{fieldName: "Address", label: "<b>Address:</b>", visible: true},
{fieldName: "City_1", label: "<b>City:</b>", visible: true}],
showAttachments:true,
});
var featureLayer = new FeatureLayer("myurl/FeatureServer/15",{
mode: FeatureLayer.MODE_ONDEMAND,
outFields: ["*"],
infoTemplate:template
});
Having this ability with a map service instead would be great.