<?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: Download photos as attachments in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/download-photos-as-attachments/m-p/785823#M7082</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi James,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, very helpful!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 02 Aug 2017 14:38:16 GMT</pubDate>
    <dc:creator>Nielsvan_Rijn2</dc:creator>
    <dc:date>2017-08-02T14:38:16Z</dc:date>
    <item>
      <title>Download photos as attachments</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/download-photos-as-attachments/m-p/785821#M7080</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We have been working on python/reportlab scripts to create custom PDF reports of features. Based on the unique id of a record the related signatures and photos are downloaded and attached. The related photos have the same parentglobalid as the globalid of the parent record and can therefore be linked.&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; '&lt;STRONG&gt;attributes&lt;/STRONG&gt;': &lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;'&lt;STRONG&gt;parentglobalid&lt;/STRONG&gt;': '1bd4647f-44f1-43c9-820d-ef91b42fd37c',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;'&lt;STRONG&gt;objectid&lt;/STRONG&gt;': 5,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;'&lt;STRONG&gt;globalid&lt;/STRONG&gt;': u'c620f95b-0d9b-4775-bada-858d34718d7b',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;'&lt;STRONG&gt;Creator&lt;/STRONG&gt;': u'&amp;lt;creatornaam&amp;gt;',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;'&lt;STRONG&gt;EditDate&lt;/STRONG&gt;': 1500029670862L,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;'&lt;STRONG&gt;Editor&lt;/STRONG&gt;': &amp;lt;editornaam&amp;gt;',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;'&lt;STRONG&gt;CreationDate&lt;/STRONG&gt;': 1500029670862L&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using the objectid of the attachment a specific URL for the photo can be constructed as can be seen below.&lt;/P&gt;&lt;P&gt;&lt;A href="http://services.arcgis.com/..../arcgis/rest/services/service_../FeatureServer/1/5/attachments/5"&gt;http://services.arcgis.com/..../arcgis/rest/services/service_../FeatureServer/1//&lt;STRONG&gt;5&lt;/STRONG&gt;//attachments//&lt;STRONG&gt;5&lt;/STRONG&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The 5 is derived from the objectid, we were assuming the last number would always need to be the same. However if someone uploads an extra photo to a webmap the last number will become 1 higher and not the same anymore as the objectid:&lt;/P&gt;&lt;P&gt;&lt;A href="http://services.arcgis.com/..../arcgis/rest/services/service_../FeatureServer/1/5/attachments/6"&gt;http://services.arcgis.com/..../arcgis/rest/services/service_../FeatureServer/1//&lt;STRONG&gt;5&lt;/STRONG&gt;//attachments//&lt;STRONG&gt;6&lt;/STRONG&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Our question is how we can know the last number?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Too bad we just found out that the last release supports custom reports. Our report works great except for the attached photos described above.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Jul 2017 10:12:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/download-photos-as-attachments/m-p/785821#M7080</guid>
      <dc:creator>Nielsvan_Rijn2</dc:creator>
      <dc:date>2017-07-28T10:12:37Z</dc:date>
    </item>
    <item>
      <title>Re: Download photos as attachments</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/download-photos-as-attachments/m-p/785822#M7081</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Niels,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To get the attachments for a feature, you need to access the attachmentInfos property:&amp;nbsp;&lt;A class="link-titled" href="http://resources.arcgis.com/en/help/arcgis-rest-api/#/Attachment_Infos_Feature_Service/02r3000000sp000000/" title="http://resources.arcgis.com/en/help/arcgis-rest-api/#/Attachment_Infos_Feature_Service/02r3000000sp000000/"&gt;ArcGIS REST API&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Jul 2017 17:53:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/download-photos-as-attachments/m-p/785822#M7081</guid>
      <dc:creator>JamesTedrick</dc:creator>
      <dc:date>2017-07-28T17:53:15Z</dc:date>
    </item>
    <item>
      <title>Re: Download photos as attachments</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/download-photos-as-attachments/m-p/785823#M7082</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi James,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, very helpful!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Aug 2017 14:38:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/download-photos-as-attachments/m-p/785823#M7082</guid>
      <dc:creator>Nielsvan_Rijn2</dc:creator>
      <dc:date>2017-08-02T14:38:16Z</dc:date>
    </item>
  </channel>
</rss>

