cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From JD Daniels>
Subject Re: Save pipeline results on client
Date Sun, 20 Feb 2005 15:31:28 GMT
In my php days, sending headers like this:

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.


Nick Goupinets wrote:
> Hi everybody,
> Thank you for reading this post. I need some help with storing pipeline 
> results on the client side. The ultimate goal is to have somewhere a 
> button, which, when clicked, will provide a "Save as" dialog box, so 
> that the user will be able to save the produced XML to his or her file 
> system.
> When I was trying to implement that, I could not come up with anything 
> better, than having a JavaScript enabled button, that will open a new 
> browser window. Window's location will point to a pipeline which ends 
> with an XML serializer with some non-default mime type (or I guess, I 
> can make a reader for this purpose). As the result, the browser will not 
> try to render the content, but rather offer a dialog box that prompts 
> user to either select a suitable application to work with the file with 
> or to save it to disk.
> Are there any more elegant solutions? Thank you very much for your time.
> Sincerely,
> Nick Goupinets.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message