I am working from home with an Internet connection that is not reliable enough to last through publishing a >2 GB map service to Portal/AGS. I saw that Pro created an SD file in %localappdata%\esri\ArcGISPro\Staging\SharingProcesses\0045 and I know that the SD file can be uploaded directly to ArcGIS Enterprise (Server Manager, Python API, etc.).
I have copied the SD file to the server's local hard drive.
I'm guessing that if I try to use Server Manager to upload the SD file (from inside a RDP connection), the web browser might be unhappy about moving a multi-GB file. Can use the ArcGIS API for Python to publish (as described at https://developers.arcgis.com/python/sample-notebooks/publishing-sd-shapefiles-and-csv/ ) the service from the server to the local instance of ArcGIS Server/Portal?
System Details:
- ArcGIS Enterprise 10.7.1
- Windows Server 2019
Solved! Go to Solution.
I'm glad the Python API should work on a machine that only has Portal and AGS. Thankfully, Firefox did not die while I published the SD file so I did not have to resort to Python.
Hi Zian,
You can try the following:
from arcgis.gis import GIS
# Variables
portal = "https://prtlserver.esri.com/portal"
username = "gis"
password = "******"
sd = r"C:\temp\SD\example.sd"
print("Connecting to {}".format(portal))
gis = GIS(portal, user, password)
print("Adding SD file to AGOL")
item = gis.content.add({}, sd)
print("Publishing SD file")
published_item = item.publish()
I'm glad the Python API should work on a machine that only has Portal and AGS. Thankfully, Firefox did not die while I published the SD file so I did not have to resort to Python.