<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Manually adding attachments in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/manually-adding-attachments/m-p/430903#M39642</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Morning Joseph,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has "Attachments" been enabled on the feature class? There are two different ways to enable attachments depending on where the feature resides. Below is a screen shot of enabling attachments for a feature which resides on ArcGIS Online. From the item details select the context menu under Layers and choose "Enable Attachments." The steps are a little different if in SDE and hosted on Portal. Hope this helps and good luck.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Attachment.jpg" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/120468_Attachment.jpg" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Aug 2015 14:02:45 GMT</pubDate>
    <dc:creator>BenGrod</dc:creator>
    <dc:date>2015-08-04T14:02:45Z</dc:date>
    <item>
      <title>Manually adding attachments</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/manually-adding-attachments/m-p/430902#M39641</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good morning,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am attempting to add attachments to my feature layer but have encountered a problem.&amp;nbsp; 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."&amp;nbsp; My feature layer does have editing enabled, and other tools in my app work properly.&amp;nbsp; I do have the proxy thing working so I don't believe it is that either.&amp;nbsp; Any suggestions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;// Open the file dialog
dom.byId("inputAttachmentFile").click();
console.log(dom.byId("inputAttachmentFile").value);
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)
{
 console.log(err);
});&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 19:22:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/manually-adding-attachments/m-p/430902#M39641</guid>
      <dc:creator>JosephRogan</dc:creator>
      <dc:date>2021-12-11T19:22:13Z</dc:date>
    </item>
    <item>
      <title>Re: Manually adding attachments</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/manually-adding-attachments/m-p/430903#M39642</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Morning Joseph,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has "Attachments" been enabled on the feature class? There are two different ways to enable attachments depending on where the feature resides. Below is a screen shot of enabling attachments for a feature which resides on ArcGIS Online. From the item details select the context menu under Layers and choose "Enable Attachments." The steps are a little different if in SDE and hosted on Portal. Hope this helps and good luck.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Attachment.jpg" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/120468_Attachment.jpg" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Aug 2015 14:02:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/manually-adding-attachments/m-p/430903#M39642</guid>
      <dc:creator>BenGrod</dc:creator>
      <dc:date>2015-08-04T14:02:45Z</dc:date>
    </item>
    <item>
      <title>Re: Manually adding attachments</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/manually-adding-attachments/m-p/430904#M39643</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes attachments are enabled.&amp;nbsp; The layer is published from my SDE.&amp;nbsp; When I test featureLayer1.hasAttachments it returns true.&amp;nbsp; Unfortunately I can't post the complete code for this site, it exists behind a firewall.&amp;nbsp; Unfortunately the AttachmentEditor widget does not meet my needs for this project either.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Aug 2015 14:18:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/manually-adding-attachments/m-p/430904#M39643</guid>
      <dc:creator>JosephRogan</dc:creator>
      <dc:date>2015-08-04T14:18:48Z</dc:date>
    </item>
    <item>
      <title>Re: Manually adding attachments</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/manually-adding-attachments/m-p/430905#M39644</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I made a stripped down version of the site to test the attachment editor widget, and it worked.&amp;nbsp; This proves to me that there isn't a problem accessing the actual feature layer or the service.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I could potentially use the AttachmentEditor if I can get it to load in my custom info window (InfoTemplate).&amp;nbsp; I'm not sure how to get this working though.&amp;nbsp; I can get it to startup in a div (and appear in my popup), but to get the line attachmentEditor.showAttachments(graphic, featureLayer1); I don't know where I'm supposed to pull the graphic objects from.&amp;nbsp; It's not wired to an event the gives that object like in the code sample.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Aug 2015 15:49:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/manually-adding-attachments/m-p/430905#M39644</guid>
      <dc:creator>JosephRogan</dc:creator>
      <dc:date>2015-08-04T15:49:18Z</dc:date>
    </item>
  </channel>
</rss>

