cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geert Josten" <geert.jos...@daidalos.nl>
Subject RE: Serialize to file?
Date Fri, 09 Feb 2007 18:43:50 GMT
I typically use the following, though there are other solutions
possible:

      <map:match pattern="download-*-zip">
        <map:generate src="cocoon:/generate-{1}-zip"/>

        <map:act type="set-header">
          <map:parameter name="Content-Type"
value="application/x-download"/>
          <map:parameter name="Content-Disposition" value="attachment ;
filename={1}.zip"/>

          <map:serialize type="zip"/>
        </map:act>
      </map:match> 

Other serializers are possible ofcourse.. :-)

HTH,
Geert

> 
   
 
Drs. G.P.H. Josten
Consultant
 
 

Daidalos BV
Source of Innovation
Hoekeindsehof 1-4
2665  JZ  Bleiswijk
Tel.: +31 (0) 10 850 1200
Fax: +31 (0) 10 850 1199
www.daidalos.nl
KvK 27164984


De informatie - verzonden in of met dit emailbericht - is afkomstig van Daidalos BV en is
uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onbedoeld hebt ontvangen,
verzoeken wij u het te verwijderen. Aan dit bericht kunnen geen rechten worden ontleend.
 

> Van: Gary Larsen [mailto:gary.larsen@envisn.com] 
> Verzonden: vrijdag 9 februari 2007 17:02
> Aan: users@cocoon.apache.org
> Onderwerp: RE: Serialize to file?
> 
> Hi Jeroen,
> 
> Thanks for your advice and pointers.  I'll give these a try.
> 
> Gary
> 
> > You could try to set the content-type of the serializer to a type 
> > which is not recognized by the browser. For instance:
> > 
> > "application/x-download" or "application/x-unknown"
> > 
> > Next to that you can use an sitemap action or something 
> equivalent to 
> > send an header to the browser:
> > 
> > ("Content-Disposition", "attachment; filename=myfile.extension")
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
>

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


Mime
View raw message