4

ArcGIS Server / Geoprocessing Question

I have a geoprocessing service that will perform a selection on a layer based on a provided expression. I would like to output the result as a csv file (or other type of file) and have it output to the browser for the user to download. Currently, i can save the output to a scratch directory on the server but I want to return it back to the user. This is similar to the clip/zip/ship process. How do I run a process and return a file back to the client?

Does anybody have a detailed workflow or example to point me to?

  • 3
    I've got an application that does this by creating a servlet to accept the initial request, then the servlet tasks the job with a local output file, and once the GP job completes, then alters the HttpServletResponse with a ContentType and Header which encourages the browser to save it. – Vince Jan 7 '15 at 19:24
  • 1
    Is your question: how do I write the Python code to do this workflow? If so, read this: geonet.esri.com/message/381403#381403 Or is it, how do I write JavaScript code? – KHibma Jan 7 '15 at 22:58
  • KHibma, your response and post ultimately led to a solution. Thank You. – jOshT Jan 9 '15 at 1:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.