With the help of several people, we made the following working code: #TP downloadDir = r"C:\arcgisserverdata\gpt_download" downloadDir = r"E:\arcgisserverdata\gpt_download" virtualDir = "http://myserver.faculty.university.state/arcgisoutput/scratch" # First generate a filename with a random unique identifier using uuid.uuid4() zipDownload = os.path.join(downloadDir, str(uuid.uuid4()) + ".zip") # Next copy the Source zipfile to the new Destination zipDownload shutil.copy2(zipfile, zipDownload) # Finally replace the local file system path with the web-accessible directory URL path url = zipDownload.replace(downloadDir, virtualDir) url = str(url).replace("\\","/") # Replace backslashes with URL forward slash convention #url = url.replace("\\", "/") newurl = url.replace("\\","/") Thank you all who contributed !
... View more