cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Lundquist ...@wrinkledog.com>
Subject Re: Save pipeline results on client
Date Mon, 21 Feb 2005 00:33:48 GMT

On Feb 20, 2005, at 7:31 AM, JD Daniels wrote:

> Header("Content-Type: application/download");
>
> Header("Content-Disposition: attachment; filename=file.ext");
>
> did what you are after.
>
> I'm not too sure exactly how, but you should be able to setup a 
> pipeline that does whatever it is your doing normally, then send those 
> two headers.

The serializer is in control of the content type, so you just make an 
instance that's configured according to what you want; e.g.,

	    <serializer logger="sitemap.serializer.text.download"
         			mime-type="application/force-download" name="text-download"
        			src="org.apache.cocoon.serialization.TextSerializer"
      		 />

To get control over the filename you can put this in your pipeline and 
smoke it :-):

	<act type="set-header">
           	 <parameter
               			name="Content-Disposition"
               			value="attachment ; filename=whatever"
             		/>
          </act>

HTH,
—ml—


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message