<?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 Unable to Upload Attachments to a Layer in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/unable-to-upload-attachments-to-a-layer/m-p/733432#M9199</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I try to add an attachment to a layer.&amp;nbsp;&lt;BR /&gt;Using the online Portal I am able to upload attachments successfully. But using the .NET Runtime SDK 100 this Operation Fails.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am able to retrieve and delete existing attachments. But unable to upload an Attachment using the ArcGisFeature.&lt;STRONG&gt;AddAttachmentAsync&lt;/STRONG&gt;, ServiceFeatureTable.&lt;STRONG&gt;UpdateFeatureAsync&lt;/STRONG&gt;, ServiceFeatureTable.&lt;STRONG&gt;AppyEditsAsync&lt;/STRONG&gt; functions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The AddAttachmentAsync call always returns an Attachment with id -10 (second gets -11, -12 and so on)&lt;BR /&gt;I am able to retrieve, delete and update the attachments I have added to my feature as long as the application is running. After restarting these attachments have vanished.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The ApplyEditsAsync Always Returns an EditResult which completet with Errors and containing the Message "&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;&lt;STRONG&gt;JSONObject["attachment"] not found.&lt;/STRONG&gt;"&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word; padding: 0px; margin: 0px;"&gt;Is there anything I am missing?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 31 Oct 2018 11:09:25 GMT</pubDate>
    <dc:creator>ChristianJäger</dc:creator>
    <dc:date>2018-10-31T11:09:25Z</dc:date>
    <item>
      <title>Unable to Upload Attachments to a Layer</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/unable-to-upload-attachments-to-a-layer/m-p/733432#M9199</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I try to add an attachment to a layer.&amp;nbsp;&lt;BR /&gt;Using the online Portal I am able to upload attachments successfully. But using the .NET Runtime SDK 100 this Operation Fails.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am able to retrieve and delete existing attachments. But unable to upload an Attachment using the ArcGisFeature.&lt;STRONG&gt;AddAttachmentAsync&lt;/STRONG&gt;, ServiceFeatureTable.&lt;STRONG&gt;UpdateFeatureAsync&lt;/STRONG&gt;, ServiceFeatureTable.&lt;STRONG&gt;AppyEditsAsync&lt;/STRONG&gt; functions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The AddAttachmentAsync call always returns an Attachment with id -10 (second gets -11, -12 and so on)&lt;BR /&gt;I am able to retrieve, delete and update the attachments I have added to my feature as long as the application is running. After restarting these attachments have vanished.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The ApplyEditsAsync Always Returns an EditResult which completet with Errors and containing the Message "&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;&lt;STRONG&gt;JSONObject["attachment"] not found.&lt;/STRONG&gt;"&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word; padding: 0px; margin: 0px;"&gt;Is there anything I am missing?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Oct 2018 11:09:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/unable-to-upload-attachments-to-a-layer/m-p/733432#M9199</guid>
      <dc:creator>ChristianJäger</dc:creator>
      <dc:date>2018-10-31T11:09:25Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to Upload Attachments to a Layer</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/unable-to-upload-attachments-to-a-layer/m-p/733433#M9200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What version of 100 x series of ArcGIS Runtime SDK .Net are you using . Where is the data hosted ArcGIS Online ( on an org) or on a premise Portal? If on premise, what is version the version of ArcGIS Portal? Is it a hosted feature service? Can you share link to the service ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Nov 2018 19:10:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/unable-to-upload-attachments-to-a-layer/m-p/733433#M9200</guid>
      <dc:creator>PreetiMaske</dc:creator>
      <dc:date>2018-11-14T19:10:28Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to Upload Attachments to a Layer</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/unable-to-upload-attachments-to-a-layer/m-p/733434#M9201</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry for the late response, I didn't see it earlier.&lt;BR /&gt;We are using the latest 100.3&amp;nbsp; SDK the data and Service is hostet on premise. Server is 10.6.1&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;Currently we can not share a Link to the Service&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jan 2019 15:18:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/unable-to-upload-attachments-to-a-layer/m-p/733434#M9201</guid>
      <dc:creator>ChristianJäger</dc:creator>
      <dc:date>2019-01-22T15:18:18Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to Upload Attachments to a Layer</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/unable-to-upload-attachments-to-a-layer/m-p/733435#M9202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can try using the specific configuration combination that you have but I think in absence of any repro data/code it might be difficult to identify the problem. In the meantime I suggest checking the Hosted feature service's capabilities.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jan 2019 18:28:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/unable-to-upload-attachments-to-a-layer/m-p/733435#M9202</guid>
      <dc:creator>PreetiMaske</dc:creator>
      <dc:date>2019-01-22T18:28:27Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to Upload Attachments to a Layer</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/unable-to-upload-attachments-to-a-layer/m-p/733436#M9203</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i continue the work of my&amp;nbsp;colleague.&lt;/P&gt;&lt;P&gt;we&amp;nbsp;still have this issue and i was able to limit the source of the error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When we&amp;nbsp;create and add a attachment&amp;nbsp;with the SDK it uses the following workflow:&lt;/P&gt;&lt;P&gt;1. Upload the attachment by calling the ...&lt;SPAN style="font-size: 11.0pt;"&gt;FeatureServer/uploads/upload&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;2. After this was successfully finished&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;3. Adding the attachment by calling&amp;nbsp; .../FeatureServer/0/1/addAttachment with the UploadID&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;Now&amp;nbsp;we get the error&amp;nbsp;&lt;SPAN style="font-size: 11.0pt; color: #ff6666; background: white;"&gt;JSONObject["attachment"] not found.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;I can reproduce this, trying to add&amp;nbsp;a attachment&amp;nbsp;with the UploadId directly in the Browser.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;The Server always expected the attachment upload.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;Refering to the documentation&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/rest/services-reference/add-attachment.htm" title="https://developers.arcgis.com/rest/services-reference/add-attachment.htm"&gt;Add Attachment—ArcGIS REST API: Services Directory | ArcGIS for Developers&lt;/A&gt;&amp;nbsp; the option&amp;nbsp;supportsAttachmentsByUploadId is true.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;As a workaround we tried to disable this option, to force the SDK uploading the file directly by calling&amp;nbsp;&lt;SPAN&gt;.../FeatureServer/0/1/addAttachment instead of uploading it before.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14.6667px;"&gt;For the "not hosted" MapServer we can't&amp;nbsp;find the&amp;nbsp;option.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14.6667px;"&gt;The&amp;nbsp;hosted MapServer/FeatureServer&amp;nbsp;contains&amp;nbsp;this option, but changing it to&amp;nbsp;&lt;SPAN&gt;supportsAttachmentsByUploadId = false does not have an effekt anyway.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Feb 2019 09:34:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/unable-to-upload-attachments-to-a-layer/m-p/733436#M9203</guid>
      <dc:creator>ChristianTügel</dc:creator>
      <dc:date>2019-02-19T09:34:08Z</dc:date>
    </item>
  </channel>
</rss>

