<?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: Unable to see images in arcgis-popup attachments in SDK 5 in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/unable-to-see-images-in-arcgis-popup-attachments/m-p/1689069#M88258</link>
    <description>&lt;P&gt;I have an asp .NET core proxy to handle secured services, and it works fine.&amp;nbsp; The proxy configuration has credentials. The problem happens on the widget too.&lt;/P&gt;&lt;LI-CODE lang="c"&gt; "allowedReferrers": [ "*" ],
 "tokenCacheMinutes": 59,
 "serverUrls": [
   {
     "url": "https://maps2.dcgis.dc.gov/dcgis/",
     "username": "ccccc",
     "password": "ccccc",
     "tokenUrl": "https://maps2.dcgis.dc.gov/dcgis/tokens/generateToken",
     "referer": "requestip",
     "useAppPoolIdentity": false
   }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;I have a function to manually upload attachments.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt; private _uploadAttachment(feature: any) {
           //create form
            const attachmentForm = document.createElement("form");
            attachmentForm.setAttribute("id", "attachmentForm");
            attachmentForm.classList.add("esri-hidden");
            let fileSelector = document.createElement("input");
            fileSelector.setAttribute("id", "fileSelector");
            fileSelector.setAttribute("type", "file");
            fileSelector.setAttribute("name", "attachment");
            fileSelector.setAttribute("accept", "image/*,video/*,application/pdf,application/msword,text/plain");
            let entInput = document.createElement("input");
            entInput.setAttribute("name", "f");
            entInput.setAttribute("value", "json");
            attachmentForm.appendChild(fileSelector);
            attachmentForm.appendChild(entInput);
            document.body.appendChild(attachmentForm);
            document.getElementById('fileSelector')?.addEventListener("change", (e) =&amp;gt; {
                let uploadedFile = (e.target as any).files[0];
                if (!uploadedFile) {
                    let message = "No file has been selected.";
                    this._errorDialogContent.innerHTML = message;
                    this._errorDialog.open = true;
                    return;
                }
                //examine file if there is a size requirement
                let result: any = this._validateUploadFile(uploadedFile);
                if (!result.isValidFile) {
                    this._errorDialogContent.innerHTML = result.msg;
                    this._errorDialog.open = true;
                    return;
                }
                let reader = new FileReader();
                reader.onload = (event) =&amp;gt; {
                    const arrayBuffer = (event.target as any).result;
                    const byteArray = new Uint8Array(arrayBuffer); // Convert to Uint8Array                
                    let blob = new Blob([byteArray], { type: uploadedFile.type });
                    this._addAttachments(feature, blob, uploadedFile.name, uploadedFile.type);
                };
                reader.onerror = () =&amp;gt; {
                    this.hideLoading();
                    this.showAlert("error", "Attachment upload has failed.", 5000);
                };
                reader.onprogress = () =&amp;gt; {
                    this.showLoading();
                };
                reader.readAsArrayBuffer(uploadedFile);

            });
            document.getElementById('fileSelector')?.click();
}&lt;/LI-CODE&gt;&lt;P&gt;I useFeatureLayer.queryAttachments to show on a form the attachments with no problem.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="2026-03-06_14-38-15.png" style="width: 490px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/149441i571DBFD473C65DAC/image-size/large?v=v2&amp;amp;px=999" role="button" title="2026-03-06_14-38-15.png" alt="2026-03-06_14-38-15.png" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;2026-03-06_14-38-15.png&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In popup it looks like this&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="2026-03-06_14-41-28.png" style="width: 460px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/149442i992A7B76C5F19847/image-size/large?v=v2&amp;amp;px=999" role="button" title="2026-03-06_14-41-28.png" alt="2026-03-06_14-41-28.png" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;2026-03-06_14-41-28.png&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The only difference I see is that in the popup the image comes with additional parameters&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="2026-03-06_14-46-36.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/149443i43FA3BAFEFCCC824/image-size/large?v=v2&amp;amp;px=999" role="button" title="2026-03-06_14-46-36.png" alt="2026-03-06_14-46-36.png" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;2026-03-06_14-46-36.png&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Appreciate any help on this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 06 Mar 2026 19:52:22 GMT</pubDate>
    <dc:creator>MKY</dc:creator>
    <dc:date>2026-03-06T19:52:22Z</dc:date>
    <item>
      <title>Unable to see images in arcgis-popup attachments in SDK 5</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/unable-to-see-images-in-arcgis-popup-attachments/m-p/1688767#M88248</link>
      <description>&lt;P&gt;Image attachments are not showing in popup from a secured service. but clicking the link opens the image in a different tab.&lt;/P&gt;&lt;P&gt;If the additional parameters w&amp;amp;s are removed from img src, the image is visible.&lt;/P&gt;&lt;P&gt;Is there any work around?&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Mar 2026 19:52:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/unable-to-see-images-in-arcgis-popup-attachments/m-p/1688767#M88248</guid>
      <dc:creator>MKY</dc:creator>
      <dc:date>2026-03-05T19:52:41Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to see images in arcgis-popup attachments in SDK 5</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/unable-to-see-images-in-arcgis-popup-attachments/m-p/1689003#M88257</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/22953"&gt;@MKY&lt;/a&gt;&amp;nbsp;-&lt;/P&gt;&lt;P&gt;Would you be able to provide more details about your configuration? I tried reproducing the issue, but haven't been able to see what you're experiencing.&amp;nbsp;&lt;/P&gt;&lt;P&gt;It looks like the request to the service with the attachments has a proxy URL appended to it. Is this a secure layer with the credentials saved in the item and that layer is being loaded in your application? Can you also confirm that this was working with the&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/references/core/widgets/Popup/" target="_self"&gt;widget&lt;/A&gt;?&lt;/P&gt;</description>
      <pubDate>Fri, 06 Mar 2026 17:03:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/unable-to-see-images-in-arcgis-popup-attachments/m-p/1689003#M88257</guid>
      <dc:creator>LaurenBoyd</dc:creator>
      <dc:date>2026-03-06T17:03:46Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to see images in arcgis-popup attachments in SDK 5</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/unable-to-see-images-in-arcgis-popup-attachments/m-p/1689069#M88258</link>
      <description>&lt;P&gt;I have an asp .NET core proxy to handle secured services, and it works fine.&amp;nbsp; The proxy configuration has credentials. The problem happens on the widget too.&lt;/P&gt;&lt;LI-CODE lang="c"&gt; "allowedReferrers": [ "*" ],
 "tokenCacheMinutes": 59,
 "serverUrls": [
   {
     "url": "https://maps2.dcgis.dc.gov/dcgis/",
     "username": "ccccc",
     "password": "ccccc",
     "tokenUrl": "https://maps2.dcgis.dc.gov/dcgis/tokens/generateToken",
     "referer": "requestip",
     "useAppPoolIdentity": false
   }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;I have a function to manually upload attachments.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt; private _uploadAttachment(feature: any) {
           //create form
            const attachmentForm = document.createElement("form");
            attachmentForm.setAttribute("id", "attachmentForm");
            attachmentForm.classList.add("esri-hidden");
            let fileSelector = document.createElement("input");
            fileSelector.setAttribute("id", "fileSelector");
            fileSelector.setAttribute("type", "file");
            fileSelector.setAttribute("name", "attachment");
            fileSelector.setAttribute("accept", "image/*,video/*,application/pdf,application/msword,text/plain");
            let entInput = document.createElement("input");
            entInput.setAttribute("name", "f");
            entInput.setAttribute("value", "json");
            attachmentForm.appendChild(fileSelector);
            attachmentForm.appendChild(entInput);
            document.body.appendChild(attachmentForm);
            document.getElementById('fileSelector')?.addEventListener("change", (e) =&amp;gt; {
                let uploadedFile = (e.target as any).files[0];
                if (!uploadedFile) {
                    let message = "No file has been selected.";
                    this._errorDialogContent.innerHTML = message;
                    this._errorDialog.open = true;
                    return;
                }
                //examine file if there is a size requirement
                let result: any = this._validateUploadFile(uploadedFile);
                if (!result.isValidFile) {
                    this._errorDialogContent.innerHTML = result.msg;
                    this._errorDialog.open = true;
                    return;
                }
                let reader = new FileReader();
                reader.onload = (event) =&amp;gt; {
                    const arrayBuffer = (event.target as any).result;
                    const byteArray = new Uint8Array(arrayBuffer); // Convert to Uint8Array                
                    let blob = new Blob([byteArray], { type: uploadedFile.type });
                    this._addAttachments(feature, blob, uploadedFile.name, uploadedFile.type);
                };
                reader.onerror = () =&amp;gt; {
                    this.hideLoading();
                    this.showAlert("error", "Attachment upload has failed.", 5000);
                };
                reader.onprogress = () =&amp;gt; {
                    this.showLoading();
                };
                reader.readAsArrayBuffer(uploadedFile);

            });
            document.getElementById('fileSelector')?.click();
}&lt;/LI-CODE&gt;&lt;P&gt;I useFeatureLayer.queryAttachments to show on a form the attachments with no problem.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="2026-03-06_14-38-15.png" style="width: 490px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/149441i571DBFD473C65DAC/image-size/large?v=v2&amp;amp;px=999" role="button" title="2026-03-06_14-38-15.png" alt="2026-03-06_14-38-15.png" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;2026-03-06_14-38-15.png&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In popup it looks like this&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="2026-03-06_14-41-28.png" style="width: 460px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/149442i992A7B76C5F19847/image-size/large?v=v2&amp;amp;px=999" role="button" title="2026-03-06_14-41-28.png" alt="2026-03-06_14-41-28.png" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;2026-03-06_14-41-28.png&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The only difference I see is that in the popup the image comes with additional parameters&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="2026-03-06_14-46-36.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/149443i43FA3BAFEFCCC824/image-size/large?v=v2&amp;amp;px=999" role="button" title="2026-03-06_14-46-36.png" alt="2026-03-06_14-46-36.png" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;2026-03-06_14-46-36.png&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Appreciate any help on this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Mar 2026 19:52:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/unable-to-see-images-in-arcgis-popup-attachments/m-p/1689069#M88258</guid>
      <dc:creator>MKY</dc:creator>
      <dc:date>2026-03-06T19:52:22Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to see images in arcgis-popup attachments in SDK 5</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/unable-to-see-images-in-arcgis-popup-attachments/m-p/1699798#M88403</link>
      <description>&lt;P&gt;Is it possible to add a property to AttachmentQuery to control (disable) dynamic image resizing and scaling?&lt;/P&gt;&lt;P&gt;When using proxy and the w and s parameters prevent it from showing in the popup.&lt;/P&gt;&lt;P&gt;If there is a workaround, please post some samples&lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2026 11:54:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/unable-to-see-images-in-arcgis-popup-attachments/m-p/1699798#M88403</guid>
      <dc:creator>MKY</dc:creator>
      <dc:date>2026-05-04T11:54:28Z</dc:date>
    </item>
  </channel>
</rss>

