Geoprocessing Service output param type: File

1024
3
Jump to solution
10-18-2017 02:15 PM
JamesCrandall
MVP Frequent Contributor

I have a GP service with an output parameter as type File -- a simple text file with a .json file extension on the end.  In some Internet browsers (mostly Internet Explorer) it does not invoke the "Download this file?" option to the user and simply opens a new tab and displays the content of the file.

Is this an IIS/server config, something with the GP service itself or perhaps even at the client I can implement to alleviate this issue?

Thanks for any ideas, I'm out of them.

0 Kudos
1 Solution

Accepted Solutions
JamesCrandall
MVP Frequent Contributor

This issue is likely due to missing file associations on the client.  Only resolution I could arrive at is to simply return a .zip file in the response.

View solution in original post

0 Kudos
3 Replies
JamesCrandall
MVP Frequent Contributor

This issue is likely due to missing file associations on the client.  Only resolution I could arrive at is to simply return a .zip file in the response.

0 Kudos
JamesMacKay3
Occasional Contributor

Is a link to the generated JSON file presented to users as an HTML anchor, similar to how download links are displayed in the JSAPI's Print Widget?  If so you could add the download attribute to the anchor tag:

HTML a download Attribute 

0 Kudos
JamesCrandall
MVP Frequent Contributor

No, I just want to allow user to "SaveAs" in IE or download into downloads directory (Chrome).  However, I don't believe download attribute is supported in IE.

https://stackoverflow.com/questions/46817974/download-file-from-server-response-with-url-as-json-fil...

In any case, it still just opened a new tab and displayed the content of the .json file that was in the response instead of downloading it.

0 Kudos