<?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: how to use JavaScript to get an attachment in a point from a feature layer in ArcGIS Online Developers Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-developers-questions/how-to-use-javascript-to-get-an-attachment-in-a/m-p/1146186#M1094</link>
    <description>&lt;P&gt;Hi &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/488813"&gt;@HaowenRui&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please share an example on how do you got the attachment URL and used it on Leaflet L.esri.featureLayer bindPopup?&lt;/P&gt;&lt;P&gt;Thank you very much!&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;</description>
    <pubDate>Mon, 21 Feb 2022 16:22:08 GMT</pubDate>
    <dc:creator>PedroVenancio</dc:creator>
    <dc:date>2022-02-21T16:22:08Z</dc:date>
    <item>
      <title>how to use JavaScript to get an attachment in a point from a feature layer</title>
      <link>https://community.esri.com/t5/arcgis-online-developers-questions/how-to-use-javascript-to-get-an-attachment-in-a/m-p/1081981#M1018</link>
      <description>&lt;P&gt;I hosted a points feature layer on Esri, and I want to pull information off from the feature layer and put it on my web map using Esri Leaflet and JavaScript. For a point with data like this: &lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2021-07-22 at 3.42.04 PM.png" style="width: 200px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/19180iCEFCCFC4A2B44993/image-size/small?v=v2&amp;amp;px=200" role="button" title="Screen Shot 2021-07-22 at 3.42.04 PM.png" alt="Screen Shot 2021-07-22 at 3.42.04 PM.png" /&gt;&lt;/span&gt;, I have 5 data rows and another attachment. I am able to pull off all the first 5 rows of data using the below sample pathname:&lt;/P&gt;&lt;P&gt;feature.properties.Name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (gives the "Name" row, returns "Snow Condition")&lt;/P&gt;&lt;P&gt;This makes sense since the pathname matches with the GeoJSON file. I just have problems finding attachments, if anyone can give me a pathname to find where the attachment is saved, that will be appreciated.&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jul 2021 21:54:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-developers-questions/how-to-use-javascript-to-get-an-attachment-in-a/m-p/1081981#M1018</guid>
      <dc:creator>HaowenRui</dc:creator>
      <dc:date>2021-07-22T21:54:17Z</dc:date>
    </item>
    <item>
      <title>Re: how to use JavaScript to get an attachment in a point from a feature layer</title>
      <link>https://community.esri.com/t5/arcgis-online-developers-questions/how-to-use-javascript-to-get-an-attachment-in-a/m-p/1086156#M1026</link>
      <description>&lt;P&gt;Have you tried looking at &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-query-support-AttachmentInfo.html#methods-summary" target="_self"&gt;AttachmentInfo&lt;/A&gt;&amp;nbsp;or &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-AttachmentsContent.html" target="_self"&gt;AttachmentContent&lt;/A&gt; in the 4.x API?&lt;BR /&gt;&lt;BR /&gt;If you'd rather work with the REST API, try getting the &lt;A href="https://developers.arcgis.com/rest/services-reference/enterprise/attachment-infos-feature-service-.htm" target="_self"&gt;attachmentInfos&lt;/A&gt; for the feature service, then use the attachmentId of the applicable record and get the &lt;A href="https://developers.arcgis.com/rest/services-reference/enterprise/attachment-feature-service-.htm" target="_self"&gt;attachment&lt;/A&gt; (documentation says the content is streamed to the user).&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Aug 2021 14:17:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-developers-questions/how-to-use-javascript-to-get-an-attachment-in-a/m-p/1086156#M1026</guid>
      <dc:creator>CourtneyMenikheim</dc:creator>
      <dc:date>2021-08-05T14:17:23Z</dc:date>
    </item>
    <item>
      <title>Re: how to use JavaScript to get an attachment in a point from a feature layer</title>
      <link>https://community.esri.com/t5/arcgis-online-developers-questions/how-to-use-javascript-to-get-an-attachment-in-a/m-p/1086425#M1028</link>
      <description>&lt;P&gt;The ArcGIS API for JavaScript makes this easier, but if you're using something like Esri Leaflet...&lt;BR /&gt;&lt;BR /&gt;To find the exact URL for the attachments you can use&amp;nbsp;&lt;BR /&gt;&lt;STRONG&gt;queryAttachments&lt;/STRONG&gt; -- see&amp;nbsp;&lt;A href="https://developers.arcgis.com/rest/services-reference/enterprise/query-attachments-feature-service-layer-.htm" target="_blank"&gt;https://developers.arcgis.com/rest/services-reference/enterprise/query-attachments-feature-service-layer-.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;For example using something like:&lt;BR /&gt;&lt;A href="https://services1.arcgis.com/9NvE8jKNWWlDGsUJ/arcgis/rest/services/QuickCap_Data/FeatureServer/0/queryAttachments?f=json&amp;amp;objectIds=7" target="_blank"&gt;https://services1.arcgis.com/9NvE8jKNWWlDGsUJ/arcgis/rest/services/QuickCap_Data/FeatureServer/0/queryAttachments?f=json&amp;amp;objectIds=7&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Based on that response the URL to the attachment would be at&lt;BR /&gt;&lt;A href="https://services1.arcgis.com/9NvE8jKNWWlDGsUJ/arcgis/rest/services/QuickCap_Data/FeatureServer/0/7/attachments/5" target="_blank"&gt;https://services1.arcgis.com/9NvE8jKNWWlDGsUJ/arcgis/rest/services/QuickCap_Data/FeatureServer/0/7/attachments/5&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Aug 2021 00:36:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-developers-questions/how-to-use-javascript-to-get-an-attachment-in-a/m-p/1086425#M1028</guid>
      <dc:creator>BjornSvensson</dc:creator>
      <dc:date>2021-08-06T00:36:57Z</dc:date>
    </item>
    <item>
      <title>Re: how to use JavaScript to get an attachment in a point from a feature layer</title>
      <link>https://community.esri.com/t5/arcgis-online-developers-questions/how-to-use-javascript-to-get-an-attachment-in-a/m-p/1088596#M1030</link>
      <description>&lt;P&gt;Thank you, this method has worked.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Aug 2021 19:13:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-developers-questions/how-to-use-javascript-to-get-an-attachment-in-a/m-p/1088596#M1030</guid>
      <dc:creator>HaowenRui</dc:creator>
      <dc:date>2021-08-12T19:13:12Z</dc:date>
    </item>
    <item>
      <title>Re: how to use JavaScript to get an attachment in a point from a feature layer</title>
      <link>https://community.esri.com/t5/arcgis-online-developers-questions/how-to-use-javascript-to-get-an-attachment-in-a/m-p/1146186#M1094</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/488813"&gt;@HaowenRui&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please share an example on how do you got the attachment URL and used it on Leaflet L.esri.featureLayer bindPopup?&lt;/P&gt;&lt;P&gt;Thank you very much!&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;</description>
      <pubDate>Mon, 21 Feb 2022 16:22:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-developers-questions/how-to-use-javascript-to-get-an-attachment-in-a/m-p/1146186#M1094</guid>
      <dc:creator>PedroVenancio</dc:creator>
      <dc:date>2022-02-21T16:22:08Z</dc:date>
    </item>
  </channel>
</rss>

