<?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 Upload Image - NetworkRequest in ArcGIS AppStudio Questions</title>
    <link>https://community.esri.com/t5/arcgis-appstudio-questions/upload-image-networkrequest/m-p/871104#M3301</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm developing an app with Appstudio Qt Creator&lt;/P&gt;&lt;P&gt;I'm trying to upload an image (camera photo) to my application server (java struts2) .&lt;/P&gt;&lt;P&gt;The server side, tested with an html form in desktop browser, works fine.&lt;BR /&gt;So I'm trying to do, in qml, the work that html form perform in browser environment.&lt;/P&gt;&lt;P&gt;Is NetworkRequest (ArcGIS.AppFramework) class &lt;SPAN class="" lang="en"&gt;&lt;SPAN class=""&gt;suitable&lt;/SPAN&gt;&lt;/SPAN&gt; for this purpose?&lt;SPAN style="color: #c0c0c0;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Otherwise can I use directly some QML class or Javascript XMLHttpRequest ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your suggestions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Massimiliano&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Dec 2016 17:12:21 GMT</pubDate>
    <dc:creator>MassimilianoSantini</dc:creator>
    <dc:date>2016-12-28T17:12:21Z</dc:date>
    <item>
      <title>Upload Image - NetworkRequest</title>
      <link>https://community.esri.com/t5/arcgis-appstudio-questions/upload-image-networkrequest/m-p/871104#M3301</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm developing an app with Appstudio Qt Creator&lt;/P&gt;&lt;P&gt;I'm trying to upload an image (camera photo) to my application server (java struts2) .&lt;/P&gt;&lt;P&gt;The server side, tested with an html form in desktop browser, works fine.&lt;BR /&gt;So I'm trying to do, in qml, the work that html form perform in browser environment.&lt;/P&gt;&lt;P&gt;Is NetworkRequest (ArcGIS.AppFramework) class &lt;SPAN class="" lang="en"&gt;&lt;SPAN class=""&gt;suitable&lt;/SPAN&gt;&lt;/SPAN&gt; for this purpose?&lt;SPAN style="color: #c0c0c0;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Otherwise can I use directly some QML class or Javascript XMLHttpRequest ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your suggestions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Massimiliano&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Dec 2016 17:12:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-appstudio-questions/upload-image-networkrequest/m-p/871104#M3301</guid>
      <dc:creator>MassimilianoSantini</dc:creator>
      <dc:date>2016-12-28T17:12:21Z</dc:date>
    </item>
    <item>
      <title>Re: Upload Image - NetworkRequest</title>
      <link>https://community.esri.com/t5/arcgis-appstudio-questions/upload-image-networkrequest/m-p/871105#M3302</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, you can go ahead and use NetworkRequest to perform&amp;nbsp;such operation. Make sure you have set the method to POST as the default values is GET. Infact we have used NetworkRequest in QuickReport to upload and add attachments such as images to featureservice which you can find in the QuickReport source code. For more help and reference please refer the NetworkRequest help page within Qt creator. There are few samples available to refer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps.&lt;/P&gt;&lt;P&gt;Nakul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Dec 2016 18:27:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-appstudio-questions/upload-image-networkrequest/m-p/871105#M3302</guid>
      <dc:creator>nakulmanocha</dc:creator>
      <dc:date>2016-12-28T18:27:59Z</dc:date>
    </item>
    <item>
      <title>Re: Upload Image - NetworkRequest</title>
      <link>https://community.esri.com/t5/arcgis-appstudio-questions/upload-image-networkrequest/m-p/871106#M3303</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nakul,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;yes, I saw the QuickReport source code but what about if I try to send the image not to a FeatureserviceLayer?&lt;/P&gt;&lt;P&gt;I'm trying to send the file to my webapplication, no FeatureLayer used.&lt;/P&gt;&lt;P&gt;Something like this&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-style: italic; color: #2985c7;"&gt;addAttachmentNetworkRequest&lt;/SPAN&gt;.send(&lt;SPAN style="font-style: italic; color: #2985c7;"&gt; image file??? &lt;/SPAN&gt;);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Dec 2016 19:17:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-appstudio-questions/upload-image-networkrequest/m-p/871106#M3303</guid>
      <dc:creator>MassimilianoSantini</dc:creator>
      <dc:date>2016-12-28T19:17:56Z</dc:date>
    </item>
    <item>
      <title>Re: Upload Image - NetworkRequest</title>
      <link>https://community.esri.com/t5/arcgis-appstudio-questions/upload-image-networkrequest/m-p/871107#M3304</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Massimiliano,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check the QuickReport-&amp;gt;controls-&amp;gt;FeatureServiceManager-&amp;gt;function addAttachement(). This might be a good example for this question.&lt;/P&gt;&lt;P&gt;In this function, we defined an object "obj" and used it in NetworkRequest :&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #808000;"&gt;var&lt;/SPAN&gt;&lt;SPAN style="color: #c0c0c0;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #2985c7;"&gt;obj&lt;/SPAN&gt;&lt;SPAN style="color: #c0c0c0;"&gt; &lt;/SPAN&gt;=&lt;SPAN style="color: #c0c0c0;"&gt; &lt;/SPAN&gt;{&lt;SPAN style="color: #008000;"&gt;"attachment"&lt;/SPAN&gt;:&lt;SPAN style="color: #c0c0c0;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #008000;"&gt;"@"&lt;/SPAN&gt;+&lt;SPAN style="color: #2985c7;"&gt;filePath&lt;/SPAN&gt;,&lt;SPAN style="color: #c0c0c0;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #008000;"&gt;"f"&lt;/SPAN&gt;:&lt;SPAN style="color: #c0c0c0;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #008000;"&gt;"json"&lt;/SPAN&gt;};
&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #2985c7;"&gt;addAttachmentNetworkRequest&lt;/SPAN&gt;.send(&lt;SPAN style="color: #2985c7;"&gt;obj&lt;/SPAN&gt;);&lt;/PRE&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;As can be seen, we contained file path for the&amp;nbsp;image&amp;nbsp;in this obj and sent it by calling&amp;nbsp;send() function. I think the similar logic could be used to send images to a private server.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;LG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 17:01:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-appstudio-questions/upload-image-networkrequest/m-p/871107#M3304</guid>
      <dc:creator>LiweiGao</dc:creator>
      <dc:date>2021-12-12T17:01:39Z</dc:date>
    </item>
    <item>
      <title>Re: Upload Image - NetworkRequest</title>
      <link>https://community.esri.com/t5/arcgis-appstudio-questions/upload-image-networkrequest/m-p/871108#M3305</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;you're right. I'm sorry,&amp;nbsp; I didn't use the "@"char!!! It's my fault.&lt;/P&gt;&lt;P&gt;Without this char I suppose that the attribute is evaluated as string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Massimiliano&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Dec 2016 14:25:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-appstudio-questions/upload-image-networkrequest/m-p/871108#M3305</guid>
      <dc:creator>MassimilianoSantini</dc:creator>
      <dc:date>2016-12-29T14:25:10Z</dc:date>
    </item>
    <item>
      <title>Re: Upload Image - NetworkRequest</title>
      <link>https://community.esri.com/t5/arcgis-appstudio-questions/upload-image-networkrequest/m-p/871109#M3306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am not able to upload file on private server, I checked the QuickReport source code but not able to get file on my php page on server, on php file I tried to print $_Request and $_FILE but not getting and image source, I am trying to resolve this issue last 2 days but no luck, Kindly help me&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Sep 2020 10:29:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-appstudio-questions/upload-image-networkrequest/m-p/871109#M3306</guid>
      <dc:creator>ManoKumar</dc:creator>
      <dc:date>2020-09-24T10:29:51Z</dc:date>
    </item>
  </channel>
</rss>

