<?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: Publishing tool set does not work as expected, when UPLOADS option is set in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/publishing-tool-set-does-not-work-as-expected-when/m-p/1388774#M27191</link>
    <description>&lt;P&gt;After checking the REST Service, the upload capability has been activated all the time.&lt;/P&gt;&lt;P&gt;there is a nice little bug in ArcGIS Server:&lt;/P&gt;&lt;P&gt;BUG-000126447&lt;/P&gt;&lt;P&gt;Uploads checkbox in Operation Allowed remains unchecked on Server Manager when the Uploads capability is enabled in a geoprocessing service.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 29 Feb 2024 13:37:43 GMT</pubDate>
    <dc:creator>Cristian_Galindo</dc:creator>
    <dc:date>2024-02-29T13:37:43Z</dc:date>
    <item>
      <title>Publishing tool set does not work as expected, when UPLOADS option is set</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/publishing-tool-set-does-not-work-as-expected-when/m-p/1387930#M27183</link>
      <description>&lt;P&gt;&lt;SPAN&gt;It is intended to publish a geoprocessing tool to an standalone ArcGIS Server version 11, as it is required to enable the UPLOADS task in the service, and following the documentation:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/3.1/arcpy/sharing/geoprocessingsharingdraft-class.htm" target="_blank"&gt;https://pro.arcgis.com/en/pro-app/3.1/arcpy/sharing/geoprocessingsharingdraft-class.htm&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;the arcpy.sharing module is intended to be used in order to create the draft and then proceed to publish (as stated in the&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Code Sample&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;in the documentation above&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This is the code used :&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;server_type = "STANDALONE_SERVER"
service_type = "GP_SERVICE"
if ags_portal is not None and ags_portal != "":
    server_type = "FEDERATED_SERVER"
    service_type = "WEB_TOOL"

draft_creator = arcpy.sharing.CreateSharingDraft(server_type, service_type,name,result)
draft_creator.summary = "NIMA version: {0} {1}".format(release_version, dt.now().strftime("%Y%m%d%H%M"))
draft_creator.targetServer = ags_file
draft_creator.tags = "NIMA"
draft_creator.offline = False
draft_creator.offlineTarget = "11"
draft_creator.overwriteExistingService = True
draft_creator.copyDataToServer = False
draft_creator.executionType = "Asynchronous"
draft_creator.serverFolder = folder_name
if ags_portal is not None and ags_portal != "":
    draft_creator.portalFolder = folder_name
draft_creator.maximumRecords = 1000
draft_creator.minInstances = 0
draft_creator.maxInstances = 2
draft_creator.maxUsageTime = 72000
draft_creator.maxWaitTime = 60,
draft_creator.maxIdleTime = 1
draft_creator.resultMapServer = False,
draft_creator.messageLevel = "Info",
if service_names[name][2]:
    draft_creator.capabilities = "UPLOADS"

draft_creator.exportToSDDraft(sd_draft)
log.add("Created service definition draft file")

arcpy.server.StageService(sd_draft, sd)
log.add("Created service definition file from draft")

# Upload the service
arcpy.server.UploadServiceDefinition(sd, ags_file)&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;When the process finish, the upload capability is not enable (please see attached image):&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ErrorUploadConfiguration.jpg" style="width: 979px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/96105iE81C877E49CC14DB/image-size/large?v=v2&amp;amp;px=999" role="button" title="ErrorUploadConfiguration.jpg" alt="ErrorUploadConfiguration.jpg" /&gt;&lt;/span&gt;&lt;BR /&gt;According to the documentation:&lt;BR /&gt;capabilities&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;(Read and Write)&lt;/DIV&gt;&lt;P&gt;&lt;SPAN&gt;The capabilities a service can support. The default value is None.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;UPLOADS&lt;/SPAN&gt;—The client can upload related operations and resources.&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;None&lt;/SPAN&gt;—No capabilities need to be set. This is the default.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN&gt;it should be enough.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2024 09:43:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/publishing-tool-set-does-not-work-as-expected-when/m-p/1387930#M27183</guid>
      <dc:creator>Cristian_Galindo</dc:creator>
      <dc:date>2024-02-28T09:43:15Z</dc:date>
    </item>
    <item>
      <title>Re: Publishing tool set does not work as expected, when UPLOADS option is set</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/publishing-tool-set-does-not-work-as-expected-when/m-p/1388768#M27189</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/104075"&gt;@Cristian_Galindo&lt;/a&gt;&amp;nbsp;, it looks like the Capabilities will only be set to Uploads when the IF statement evaluates to True. Are you sure your IF statement is working as you intend ?&lt;/P&gt;&lt;PRE&gt;if service_names[name][2]:
    draft_creator.capabilities = "UPLOADS"&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Feb 2024 13:31:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/publishing-tool-set-does-not-work-as-expected-when/m-p/1388768#M27189</guid>
      <dc:creator>ChrisUnderwood</dc:creator>
      <dc:date>2024-02-29T13:31:52Z</dc:date>
    </item>
    <item>
      <title>Re: Publishing tool set does not work as expected, when UPLOADS option is set</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/publishing-tool-set-does-not-work-as-expected-when/m-p/1388772#M27190</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/159762"&gt;@ChrisUnderwood&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;when debugging several times prior to post my question, the line that sets the capabilities, always was hit.&lt;/P&gt;&lt;P&gt;Cheers.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Feb 2024 13:35:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/publishing-tool-set-does-not-work-as-expected-when/m-p/1388772#M27190</guid>
      <dc:creator>Cristian_Galindo</dc:creator>
      <dc:date>2024-02-29T13:35:10Z</dc:date>
    </item>
    <item>
      <title>Re: Publishing tool set does not work as expected, when UPLOADS option is set</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/publishing-tool-set-does-not-work-as-expected-when/m-p/1388774#M27191</link>
      <description>&lt;P&gt;After checking the REST Service, the upload capability has been activated all the time.&lt;/P&gt;&lt;P&gt;there is a nice little bug in ArcGIS Server:&lt;/P&gt;&lt;P&gt;BUG-000126447&lt;/P&gt;&lt;P&gt;Uploads checkbox in Operation Allowed remains unchecked on Server Manager when the Uploads capability is enabled in a geoprocessing service.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Feb 2024 13:37:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/publishing-tool-set-does-not-work-as-expected-when/m-p/1388774#M27191</guid>
      <dc:creator>Cristian_Galindo</dc:creator>
      <dc:date>2024-02-29T13:37:43Z</dc:date>
    </item>
  </channel>
</rss>

