[Geoserver-users] force download/save WMS png output rather than display image

Hi,

Is there any way to cause GeoServer to output the appropriate headers so that the user will get a 'Save As' dialogue after clicking a link with a WMS href (rather than just having the browser display the image)? It's been a while, but I think the Content-Disposition HTTP header has to be set specially, and possibly some others.

Thanks!

Greg

Greg Ederer ha scritto:

Hi,

Is there any way to cause GeoServer to output the appropriate headers so that the user will get a 'Save As' dialogue after clicking a link with a WMS href (rather than just having the browser display the image)? It's been a while, but I think the Content-Disposition HTTP header has to be set specially, and possibly some others.

Yup, we do that for the SHAPE-ZIP output and for the PDF one, but
not for PNG images.
We have no option either, but I guess it would not be so hard to
add a format_option to force the content disposition that way.

Can you open a jira issue. A patch along with it would be appreciated
too :wink:

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

Jira opened. --Thanks

Greg

On Jun 18, 2009, at 9:10 AM, Andrea Aime wrote:

Greg Ederer ha scritto:

Hi,
Is there any way to cause GeoServer to output the appropriate headers so that the user will get a 'Save As' dialogue after clicking a link with a WMS href (rather than just having the browser display the image)? It's been a while, but I think the Content-Disposition HTTP header has to be set specially, and possibly some others.

Yup, we do that for the SHAPE-ZIP output and for the PDF one, but
not for PNG images.
We have no option either, but I guess it would not be so hard to
add a format_option to force the content disposition that way.

Can you open a jira issue. A patch along with it would be appreciated
too :wink:

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.