<?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: Add Attachment in Qt Maps SDK Questions</title>
    <link>https://community.esri.com/t5/qt-maps-sdk-questions/add-attachment/m-p/241164#M1225</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Read only, meaning the Query endpoint is not enabled, correct? If correct, then I can't think of a good way to do this in the Runtime API, because you'd typically do this through a ServiceFeatureTable object. However, in order to populate the feature table with features, it will need to be able to call query on the service.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Outside of the Runtime API, you could make a request like you mentioned. ex:&amp;nbsp;&lt;A href="http://sampleserver6.arcgisonline.com/arcgis/rest/services/Wildfire/FeatureServer/0/3088311/addAttachment"&gt;http://sampleserver6.arcgisonline.com/arcgis/rest/services/Wildfire/FeatureServer/0/3088311/addAttachment&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With AppStudio you could use the NetworkRequest type perhaps -&amp;nbsp;&lt;A href="https://doc.arcgis.com/en/appstudio/api/reference/framework/qml-arcgis-appframework-networkrequest/"&gt;https://doc.arcgis.com/en/appstudio/api/reference/framework/qml-arcgis-appframework-networkrequest/&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 24 Jul 2019 18:16:10 GMT</pubDate>
    <dc:creator>LucasDanzinger</dc:creator>
    <dc:date>2019-07-24T18:16:10Z</dc:date>
    <item>
      <title>Add Attachment</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/add-attachment/m-p/241161#M1222</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;I'm using appstudio, and trying to add attachment to a feature service that doesn't enable reading capability.&lt;/P&gt;&lt;P&gt;I do so using&amp;nbsp;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #008000;"&gt;featureServiceManager.addAttachment

&lt;/SPAN&gt;But this doesn't work for me, could you please let me know if there is another way for adding attachments to it.
Thanks in advance.


&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 16:14:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/add-attachment/m-p/241161#M1222</guid>
      <dc:creator>AbdelrahmanAbdelrazek</dc:creator>
      <dc:date>2021-12-12T16:14:15Z</dc:date>
    </item>
    <item>
      <title>Re: Add Attachment</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/add-attachment/m-p/241162#M1223</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I recommend you take a look at our sample code for modifying feature attachments -&amp;nbsp;&lt;A href="https://github.com/Esri/arcgis-runtime-samples-qt/blob/master/ArcGISRuntimeSDKQt_QMLSamples/EditData/EditFeatureAttachments/EditFeatureAttachments.qml"&gt;https://github.com/Esri/arcgis-runtime-samples-qt/blob/master/ArcGISRuntimeSDKQt_QMLSamples/EditData/EditFeatureAttachments/EditFeatureAttachments.qml&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jul 2019 14:37:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/add-attachment/m-p/241162#M1223</guid>
      <dc:creator>LucasDanzinger</dc:creator>
      <dc:date>2019-07-24T14:37:36Z</dc:date>
    </item>
    <item>
      <title>Re: Add Attachment</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/add-attachment/m-p/241163#M1224</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks &lt;A href="https://community.esri.com/migrated-users/25477"&gt;Lucas Danzinger&lt;/A&gt;‌ for your response.&lt;/P&gt;&lt;P&gt;I already had a look on it, but the problem that it works against a feature service that has read capability, which enables us selecting the feature and adding attachment, but in my case the feature service doesn't has read cabibility so no way to see the features and selecting them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think the only way for doing so, is through the sending post request to the rest endpoint but the header's content-type should be x-www-form-urlencoded, - i do this successfully using postman, but till now i'm not able to do so through QML.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jul 2019 14:49:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/add-attachment/m-p/241163#M1224</guid>
      <dc:creator>AbdelrahmanAbdelrazek</dc:creator>
      <dc:date>2019-07-24T14:49:20Z</dc:date>
    </item>
    <item>
      <title>Re: Add Attachment</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/add-attachment/m-p/241164#M1225</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Read only, meaning the Query endpoint is not enabled, correct? If correct, then I can't think of a good way to do this in the Runtime API, because you'd typically do this through a ServiceFeatureTable object. However, in order to populate the feature table with features, it will need to be able to call query on the service.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Outside of the Runtime API, you could make a request like you mentioned. ex:&amp;nbsp;&lt;A href="http://sampleserver6.arcgisonline.com/arcgis/rest/services/Wildfire/FeatureServer/0/3088311/addAttachment"&gt;http://sampleserver6.arcgisonline.com/arcgis/rest/services/Wildfire/FeatureServer/0/3088311/addAttachment&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With AppStudio you could use the NetworkRequest type perhaps -&amp;nbsp;&lt;A href="https://doc.arcgis.com/en/appstudio/api/reference/framework/qml-arcgis-appframework-networkrequest/"&gt;https://doc.arcgis.com/en/appstudio/api/reference/framework/qml-arcgis-appframework-networkrequest/&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jul 2019 18:16:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/add-attachment/m-p/241164#M1225</guid>
      <dc:creator>LucasDanzinger</dc:creator>
      <dc:date>2019-07-24T18:16:10Z</dc:date>
    </item>
    <item>
      <title>Re: Add Attachment</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/add-attachment/m-p/241165#M1226</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, the query endpoint is not enabled, and as a result i can't make use of this way&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fsampleserver6.arcgisonline.com%2Farcgis%2Frest%2Fservices%2FWildfire%2FFeatureServer%2F0%2F3088311%2FaddAttachment" rel="nofollow" style="color: #287433; background-color: #ffffff; border: 0px; text-decoration: none; font-size: 14px; padding: 0px calc(12px + 0.35ex) 0px 0px;" target="_blank"&gt;http://sampleserver6.arcgisonline.com/arcgis/rest/services/Wildfire/FeatureServer/0/3088311/addAttachment&lt;/A&gt;&lt;/P&gt;&lt;P&gt;when i try to do so, it says "this operation is not supported" -- as shown in attached picture.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But i managed to find a way to do so, i'm only stuck in finding an equivalent to&lt;STRONG&gt; FileReader.readAsDataURL()&amp;nbsp;&lt;/STRONG&gt;which is used in &lt;STRONG&gt;javascript&lt;/STRONG&gt; to&amp;nbsp;provide&amp;nbsp;&lt;SPAN style="color: #333333; background-color: #ffffff; font-size: 16px;"&gt;file's data as a base64 encoded string.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; background-color: #ffffff; font-size: 16px;"&gt;&lt;A href="https://developer.mozilla.org/en-US/docs/Web/API/FileReader/readAsDataURL"&gt;https://developer.mozilla.org/en-US/docs/Web/API/FileReader/readAsDataURL&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; background-color: #ffffff; font-size: 16px;"&gt;If there is such a method in QML, i will be grateful if you let me know.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; background-color: #ffffff; font-size: 16px;"&gt;(a way for getting file's&amp;nbsp;&lt;SPAN&gt;data as a base64 encoded string&lt;/SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; background-color: #ffffff; font-size: 16px;"&gt;&lt;IMG __jive_id="454232" alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/454232_Capture.PNG" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;H3 class="" style="font-weight: normal; text-decoration: underline; font-size: 18px;"&gt;&lt;/H3&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jul 2019 18:44:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/add-attachment/m-p/241165#M1226</guid>
      <dc:creator>AbdelrahmanAbdelrazek</dc:creator>
      <dc:date>2019-07-24T18:44:47Z</dc:date>
    </item>
  </channel>
</rss>

