<?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: Update FeatureLayer using applyEdits() - working with attachments? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-featurelayer-using-applyedits-working-with/m-p/1183270#M77693</link>
    <description>&lt;LI-CODE lang="javascript"&gt;/ Call FeatureLayer.applyEdits() with specified params.
        function applyEditsToIncidents(params) {
          document.getElementById("btnUpdate").style.cursor = "progress";
          obsLayer.applyEdits(params).then((editsResult) =&amp;gt; {
              // Get the objectId of the newly added feature.
              // Call selectFeature function to highlight the new feature.
              if (editsResult.addFeatureResults.length &amp;gt; 0 || editsResult.updateFeatureResults.length &amp;gt; 0) {
                unselectFeature();
                let objectId;
                if (editsResult.addFeatureResults.length &amp;gt; 0) {
                  objectId = editsResult.addFeatureResults[0].objectId;
                } else {
                  featureForm.feature = null;
                  objectId = editsResult.updateFeatureResults[0].objectId;
                }
                selectFeature(objectId);
                if (addFeatureDiv.style.display === "block") {
                  toggleEditingDivs("none", "block");
                } else if (addFeatureDiv.style.display === "none") {
                  toggleEditingDivs("block", "none");
                }
              }
              // show FeatureTemplates if user deleted a feature
              else if (editsResult.deleteFeatureResults.length &amp;gt; 0) {
                toggleEditingDivs("block", "none");
              }
            })
            .catch((error) =&amp;gt; {
              console.log("error = ", error);
            });
        }&lt;/LI-CODE&gt;</description>
    <pubDate>Wed, 15 Jun 2022 19:29:50 GMT</pubDate>
    <dc:creator>luckachi</dc:creator>
    <dc:date>2022-06-15T19:29:50Z</dc:date>
    <item>
      <title>Update FeatureLayer using applyEdits() - working with attachments?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-featurelayer-using-applyedits-working-with/m-p/1182704#M77668</link>
      <description>&lt;P&gt;Working with the&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/editing-applyedits/" target="_self"&gt;Update FeatureLayer using applyEdits()&lt;/A&gt;&amp;nbsp; sample code I have added a button in attributeArea div to select an image file to add (update) the point that is currently selected.&lt;/P&gt;&lt;P&gt;I've updated the featureform.on submit process (below - lines 6 and 17) but it seems to be throwing an error that &lt;SPAN&gt;"When 'addAttachments', 'updateAttachments' or 'deleteAttachments' is specified, globalIdUsed should be set to true"&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not quite sure how to exactly handle attachments in this situation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;featureForm.on("submit", () =&amp;gt; {
          if (editFeature) {

            // Grab updated attributes from the form.
            const updated = featureForm.getValues();
            const attachmentForm = document.getElementById("photo");

            // Loop through updated attributes and assign
            // the updated values to feature attributes.
            Object.keys(updated).forEach((name) =&amp;gt; {
              editFeature.attributes[name] = updated[name];
            });

            // Setup the applyEdits parameter with updates.
            const edits = {
              updateFeatures: [editFeature],
              addAttachments: [attachmentForm]
            };

            console.log(edits);
            applyEditsToIncidents(edits);
            document.getElementById("viewDiv").style.cursor = "auto";
          }
        });&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2022 14:18:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-featurelayer-using-applyedits-working-with/m-p/1182704#M77668</guid>
      <dc:creator>luckachi</dc:creator>
      <dc:date>2022-06-14T14:18:09Z</dc:date>
    </item>
    <item>
      <title>Re: Update FeatureLayer using applyEdits() - working with attachments?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-featurelayer-using-applyedits-working-with/m-p/1182742#M77669</link>
      <description>&lt;P&gt;Looking at the doc, the attachmentForm should be an object with feature and attachment, not just a form, so it knows which feature to attach it.&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#AttachmentEdit" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#AttachmentEdit&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I think you need to do this after you do addFeature, because it looks like you need the objectId or globalId to add the attachment. So you would do your edit in two steps.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2022 15:17:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-featurelayer-using-applyedits-working-with/m-p/1182742#M77669</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2022-06-14T15:17:19Z</dc:date>
    </item>
    <item>
      <title>Re: Update FeatureLayer using applyEdits() - working with attachments?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-featurelayer-using-applyedits-working-with/m-p/1182822#M77673</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/7384"&gt;@ReneRubalcava&lt;/a&gt;&amp;nbsp;- I will see if that works!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2022 17:48:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-featurelayer-using-applyedits-working-with/m-p/1182822#M77673</guid>
      <dc:creator>luckachi</dc:creator>
      <dc:date>2022-06-14T17:48:43Z</dc:date>
    </item>
    <item>
      <title>Re: Update FeatureLayer using applyEdits() - working with attachments?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-featurelayer-using-applyedits-working-with/m-p/1182892#M77674</link>
      <description>&lt;P&gt;So just in testing I added the following to the featureform.on Submit (which is after the feature is created and the attributes are brought into the feature form.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const attachments = [{
              editFeature,
              attachment: {
                globalId: editFeature.attributes.GlobalID,
                data: photo
              }
            }];

            // Setup the applyEdits parameter with updates.
            const edits = {
              updateFeatures: [editFeature],
              addAttachments: attachments
            };&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My HTML button is&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt; Select a file: &amp;lt;input type="file" class="esri-button" id="photo"&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not exactly sure if I making any progress with this but it does show up in the console and the globalId matches&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="luckachi_0-1655236719935.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/43475i702B55B4C6AEAA15/image-size/medium?v=v2&amp;amp;px=400" role="button" title="luckachi_0-1655236719935.png" alt="luckachi_0-1655236719935.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;but I am receiving an error&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="luckachi_1-1655236758844.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/43476iEBC26CB3D706AEA9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="luckachi_1-1655236758844.png" alt="luckachi_1-1655236758844.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;In my feature layer JSON it does say&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;  "supportsApplyEditsWithGlobalIds" : true, &lt;/PRE&gt;</description>
      <pubDate>Tue, 14 Jun 2022 20:05:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-featurelayer-using-applyedits-working-with/m-p/1182892#M77674</guid>
      <dc:creator>luckachi</dc:creator>
      <dc:date>2022-06-14T20:05:07Z</dc:date>
    </item>
    <item>
      <title>Re: Update FeatureLayer using applyEdits() - working with attachments?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-featurelayer-using-applyedits-working-with/m-p/1182898#M77675</link>
      <description>&lt;P&gt;Ah, if you're using the globalId, you need to pass the globalIdUsed property as true in the options. There's a snippet in the doc here further down the page&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#applyEdits" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#applyEdits&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2022 20:07:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-featurelayer-using-applyedits-working-with/m-p/1182898#M77675</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2022-06-14T20:07:54Z</dc:date>
    </item>
    <item>
      <title>Re: Update FeatureLayer using applyEdits() - working with attachments?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-featurelayer-using-applyedits-working-with/m-p/1183262#M77689</link>
      <description>&lt;P&gt;so at the moment, I have this set up during the featureForm.on("submit") process. Everything seems to be okay, but then I receive an error message that reads &lt;STRONG&gt;error =&amp;nbsp;l&amp;nbsp;details: undefined&amp;nbsp;message: "When 'addAttachments', 'updateAttachments' or 'deleteAttachments' is specified, globalIdUsed should be set to true"&amp;nbsp;name: "feature-layer:invalid-parameter"&amp;nbsp;[[Prototype]]: c&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;            const blob = new Blob(document.getElementById("myForm1"), { type: "image/jpeg" })
            const attachments = {
              feature: editFeature,
              attachment: {
                globalId: editFeature.attributes.GlobalID,
                data: blob
              }
            }

            // Setup the applyEdits parameter with updates.
            const edits = {
              updateFeatures: [editFeature],
              addAttachments: [attachments]
            };

            const options = {
              // globalIdUsed has to be true when adding, updating or deleting attachments
              globalIdUsed: true
            };

            console.log(edits);
            applyEditsToIncidents(edits, options);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;HTML form looks like this:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;form id="myForm1"&amp;gt;
Please include a photo: &amp;lt;input type="file" name="attachment"/&amp;gt;
&amp;lt;input type="hidden" name="f" value="json"&amp;gt;
&amp;lt;/form&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jun 2022 19:14:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-featurelayer-using-applyedits-working-with/m-p/1183262#M77689</guid>
      <dc:creator>luckachi</dc:creator>
      <dc:date>2022-06-15T19:14:13Z</dc:date>
    </item>
    <item>
      <title>Re: Update FeatureLayer using applyEdits() - working with attachments?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-featurelayer-using-applyedits-working-with/m-p/1183269#M77692</link>
      <description>&lt;P&gt;What does "applyEditsToIncidents" look like? Is it passing the options correctly?&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jun 2022 19:28:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-featurelayer-using-applyedits-working-with/m-p/1183269#M77692</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2022-06-15T19:28:23Z</dc:date>
    </item>
    <item>
      <title>Re: Update FeatureLayer using applyEdits() - working with attachments?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-featurelayer-using-applyedits-working-with/m-p/1183270#M77693</link>
      <description>&lt;LI-CODE lang="javascript"&gt;/ Call FeatureLayer.applyEdits() with specified params.
        function applyEditsToIncidents(params) {
          document.getElementById("btnUpdate").style.cursor = "progress";
          obsLayer.applyEdits(params).then((editsResult) =&amp;gt; {
              // Get the objectId of the newly added feature.
              // Call selectFeature function to highlight the new feature.
              if (editsResult.addFeatureResults.length &amp;gt; 0 || editsResult.updateFeatureResults.length &amp;gt; 0) {
                unselectFeature();
                let objectId;
                if (editsResult.addFeatureResults.length &amp;gt; 0) {
                  objectId = editsResult.addFeatureResults[0].objectId;
                } else {
                  featureForm.feature = null;
                  objectId = editsResult.updateFeatureResults[0].objectId;
                }
                selectFeature(objectId);
                if (addFeatureDiv.style.display === "block") {
                  toggleEditingDivs("none", "block");
                } else if (addFeatureDiv.style.display === "none") {
                  toggleEditingDivs("block", "none");
                }
              }
              // show FeatureTemplates if user deleted a feature
              else if (editsResult.deleteFeatureResults.length &amp;gt; 0) {
                toggleEditingDivs("block", "none");
              }
            })
            .catch((error) =&amp;gt; {
              console.log("error = ", error);
            });
        }&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 15 Jun 2022 19:29:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-featurelayer-using-applyedits-working-with/m-p/1183270#M77693</guid>
      <dc:creator>luckachi</dc:creator>
      <dc:date>2022-06-15T19:29:50Z</dc:date>
    </item>
    <item>
      <title>Re: Update FeatureLayer using applyEdits() - working with attachments?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-featurelayer-using-applyedits-working-with/m-p/1183274#M77696</link>
      <description>&lt;P&gt;That's not passing the options. You can update it like this.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;function applyEditsToIncidents(params, options) {
          document.getElementById("btnUpdate").style.cursor = "progress";
          obsLayer.applyEdits(params, options).then((editsResult) =&amp;gt; {&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 15 Jun 2022 19:34:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-featurelayer-using-applyedits-working-with/m-p/1183274#M77696</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2022-06-15T19:34:34Z</dc:date>
    </item>
    <item>
      <title>Re: Update FeatureLayer using applyEdits() - working with attachments?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-featurelayer-using-applyedits-working-with/m-p/1183278#M77697</link>
      <description>&lt;P&gt;Doh! Thank you&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/7384"&gt;@ReneRubalcava&lt;/a&gt;&amp;nbsp;&amp;nbsp;. That did the trick...however, I do have one last question. I looked at the attachment that was uploaded and it looks like just one pixel square versus the full image?&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jun 2022 19:41:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-featurelayer-using-applyedits-working-with/m-p/1183278#M77697</guid>
      <dc:creator>luckachi</dc:creator>
      <dc:date>2022-06-15T19:41:48Z</dc:date>
    </item>
    <item>
      <title>Re: Update FeatureLayer using applyEdits() - working with attachments?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-featurelayer-using-applyedits-working-with/m-p/1183547#M77704</link>
      <description>&lt;P&gt;This is what ends up being the attachment, even though a .jpg file is selected. Everything comes through as 50 B ?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="luckachi_0-1655389943966.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/43621i281947ACB9378EDC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="luckachi_0-1655389943966.png" alt="luckachi_0-1655389943966.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2022 14:34:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-featurelayer-using-applyedits-working-with/m-p/1183547#M77704</guid>
      <dc:creator>luckachi</dc:creator>
      <dc:date>2022-06-16T14:34:13Z</dc:date>
    </item>
    <item>
      <title>Re: Update FeatureLayer using applyEdits() - working with attachments?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-featurelayer-using-applyedits-working-with/m-p/1183615#M77705</link>
      <description>&lt;P&gt;What is your attachmentForm? Is it a form or just the image? You need to make it a Blob or FormData to upload it. There's a snippet in the FeatureLayer addAttachment doc that shows how you can do it.&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#addAttachment" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#addAttachment&lt;/A&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;view.when(function () {
  view.on("click", function (event) {

    view.hitTest(event).then(function (response) {
      const feature = response.results[0].graphic;

      // The form is defined as below in the html.
      // For enterprise services:
      // 1. File input name must be "attachment"
      // &amp;lt;form id="attachmentForm"&amp;gt;
      //   Select a file: &amp;lt;input type="file" name="attachment"&amp;gt;
      // &amp;lt;/form&amp;gt;
      const attachmentForm = document.getElementById("attachmentForm");
      const formData = new FormData(attachmentForm);

      // For enterprise services - add input with name:f and value:json
      formData.append("f","json");
      const form = new FormData();
      form.set("attachment", file);
      form.append("f","json")
      let form = document.getElementById("myForm");

      // Add an attachment to the clicked feature.
      // The attachment is taken from the form.
      layer.addAttachment(feature, form).then(function (result) {
        console.log("attachment added: ", result);
      })
      .catch(function (err) {
        console.log("attachment adding failed: ", err);
      });
    });
  });
});&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 16 Jun 2022 16:12:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-featurelayer-using-applyedits-working-with/m-p/1183615#M77705</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2022-06-16T16:12:58Z</dc:date>
    </item>
    <item>
      <title>Re: Update FeatureLayer using applyEdits() - working with attachments?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-featurelayer-using-applyedits-working-with/m-p/1183632#M77709</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/7384"&gt;@ReneRubalcava&lt;/a&gt;&amp;nbsp;, I appreciate the help with this - I am still learning all the ins and outs of Javascript.&lt;BR /&gt;&lt;BR /&gt;It is just an image that I would like to be able to upload with the record. I have been working with this code snippet but with no success, it still comes through as just a small white square with a size of 50., sometimes 25.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;form id="myForm1"&amp;gt;
Please include a photo: &amp;lt;input type="file" name="attachment" accept="image/jpeg"&amp;gt;
&amp;lt;input type="hidden" name="f" value="json"&amp;gt;
&amp;lt;/form&amp;gt;&lt;/LI-CODE&gt;&lt;LI-CODE lang="javascript"&gt;const blob = new Blob(document.getElementById("myForm1"), { type: "image/jpeg" })
            // console.log(selectedFile);
            const attachments = {
              feature: editFeature,
              attachment: {
                globalId: editFeature.attributes.GlobalID,
                name: "attachment_" + Date.now(),
                contentType: "image/jpeg",
                data: blob
              }
            }

            // Setup the applyEdits parameter with updates.
            const edits = {
              updateFeatures: [editFeature],
              addAttachments: [attachments]
            };

            const options = {
              // globalIdUsed has to be true when adding, updating or deleting attachments
              globalIdUsed: true
            };

            console.log(edits);
            applyEditsToIncidents(edits, options);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2022 16:33:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-featurelayer-using-applyedits-working-with/m-p/1183632#M77709</guid>
      <dc:creator>luckachi</dc:creator>
      <dc:date>2022-06-16T16:33:34Z</dc:date>
    </item>
    <item>
      <title>Re: Update FeatureLayer using applyEdits() - working with attachments?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-featurelayer-using-applyedits-working-with/m-p/1183668#M77711</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/7384"&gt;@ReneRubalcava&lt;/a&gt;&amp;nbsp;- Looks like I got it - I added .files[0] to the blob line and changed the HTML section to just have the input line. Seems to be working at the moment!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;            const blob = new Blob([document.getElementById("photo").files[0]], { type: "image/jpeg" })
            //console.log(blob);
            const attachments = {
              feature: editFeature,
              attachment: {
                globalId: editFeature.attributes.GlobalID,
                name: "attachment_" + Date.now(),
                data: blob
              }
            }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;!-- &amp;lt;form id="myForm1"&amp;gt; --&amp;gt;
Please include a photo: &amp;lt;input type="file" id="photo" name="attachment" accept="image/jpeg"&amp;gt;
&amp;lt;!-- &amp;lt;input type="hidden" name="f" value="json"&amp;gt;
&amp;lt;/form&amp;gt; --&amp;gt;&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 16 Jun 2022 17:35:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-featurelayer-using-applyedits-working-with/m-p/1183668#M77711</guid>
      <dc:creator>luckachi</dc:creator>
      <dc:date>2022-06-16T17:35:00Z</dc:date>
    </item>
  </channel>
</rss>

