<?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 Attachments in Popup Template in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/attachments-in-popup-template/m-p/276982#M25548</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to show attachments in a popup (mapimagelayer) using that piece of code, and it's not working (I can see the attachment in the rest end point (pdf)):&lt;/P&gt;&lt;DIV style="color: #d4d4d4; background-color: #1e1e1e; font-weight: normal; font-size: 14px;"&gt;&lt;DIV&gt;&lt;SPAN style="color: #9cdcfe;"&gt;popupTemplate: {&lt;/SPAN&gt;&lt;BR /&gt;&lt;DIV style="color: #d4d4d4; background-color: #1e1e1e; font-weight: normal;"&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; outFields:&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; [&lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;'*'&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;],&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV style="color: #d4d4d4; background-color: #1e1e1e; font-weight: normal;"&gt;&amp;nbsp; title:"test",&lt;/DIV&gt;&lt;DIV style="color: #d4d4d4; background-color: #1e1e1e; font-weight: normal;"&gt;&amp;nbsp; content: [{type: "attachments"}]&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #9cdcfe;"&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 14 Feb 2020 11:06:38 GMT</pubDate>
    <dc:creator>MatthieuThery1</dc:creator>
    <dc:date>2020-02-14T11:06:38Z</dc:date>
    <item>
      <title>Attachments in Popup Template</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/attachments-in-popup-template/m-p/276982#M25548</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to show attachments in a popup (mapimagelayer) using that piece of code, and it's not working (I can see the attachment in the rest end point (pdf)):&lt;/P&gt;&lt;DIV style="color: #d4d4d4; background-color: #1e1e1e; font-weight: normal; font-size: 14px;"&gt;&lt;DIV&gt;&lt;SPAN style="color: #9cdcfe;"&gt;popupTemplate: {&lt;/SPAN&gt;&lt;BR /&gt;&lt;DIV style="color: #d4d4d4; background-color: #1e1e1e; font-weight: normal;"&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; outFields:&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; [&lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;'*'&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;],&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV style="color: #d4d4d4; background-color: #1e1e1e; font-weight: normal;"&gt;&amp;nbsp; title:"test",&lt;/DIV&gt;&lt;DIV style="color: #d4d4d4; background-color: #1e1e1e; font-weight: normal;"&gt;&amp;nbsp; content: [{type: "attachments"}]&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #9cdcfe;"&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Feb 2020 11:06:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/attachments-in-popup-template/m-p/276982#M25548</guid>
      <dc:creator>MatthieuThery1</dc:creator>
      <dc:date>2020-02-14T11:06:38Z</dc:date>
    </item>
    <item>
      <title>Re: Attachments in Popup Template</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/attachments-in-popup-template/m-p/276983#M25549</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Matthieu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you using 4.x API? Here is the example:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-AttachmentsContent.html" title="https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-AttachmentsContent.html" rel="nofollow noopener noreferrer" target="_blank"&gt;AttachmentsContent | ArcGIS API for JavaScript 4.14&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="comment token"&gt;// Create the AttachmentsContent popup element &lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;// If the selected feature has attributes associated with it, they will display within the popup &lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;let&lt;/SPAN&gt; attachmentsElement &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;AttachmentsContent&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt; displayType&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"list"&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; 
&lt;SPAN class="comment token"&gt;// Create the PopupTemplate &lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;let&lt;/SPAN&gt; template &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;PopupTemplate&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt; 
   title&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Beverly Hills trees by block"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; 
   outFields&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"*"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; 
   content&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;attachmentsElement&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; 
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are using 3.x API, it should like this:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/3/jssamples/popup_relatedrecords.html" title="https://developers.arcgis.com/javascript/3/jssamples/popup_relatedrecords.html" rel="nofollow noopener noreferrer" target="_blank"&gt;Popup with related fields | ArcGIS API for JavaScript 3.31&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; popupTemplate &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;PopupTemplate&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
    &lt;SPAN class="string token"&gt;"title"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Beverly Hills Trees By Block"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
    &lt;SPAN class="string token"&gt;"fieldInfos"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;
     &lt;SPAN class="comment token"&gt;//...&lt;/SPAN&gt;
     &lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
    &lt;SPAN class="string token"&gt;"description"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;""&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
    &lt;SPAN class="string token"&gt;"showAttachments"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;true&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
    &lt;SPAN class="string token"&gt;"mediaInfos"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍

&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; featureLayer &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;FeatureLayer&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;LAYERURL&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
    mode&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; FeatureLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;MODE_SNAPSHOT&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
    infoTemplate&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; popupTemplate&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
    outFields&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"*"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:29:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/attachments-in-popup-template/m-p/276983#M25549</guid>
      <dc:creator>LeoLiu1</dc:creator>
      <dc:date>2021-12-11T13:29:17Z</dc:date>
    </item>
  </channel>
</rss>

