Hi Sebastien,
You can define an action class in which you can set the Content-disposition header. In the action calss you define, you have to implement act() method which takes 4 arguments(Redirector redirector,SourceResolver resolver,Map objectModel,String source,Parameters parameters).
From the object model you can get the request and response objects In the response object you can set the two headers content-type and content-disposition.
This action you need to define in the sitemap.xmap.
Hope this helps.
Murthy
| "S�bastien Barathieu"
<[EMAIL PROTECTED]>
04/12/2005 12:33 PM
|
|
Thank you,
I want to download on the server and i have enabled upload in the config, could you say me what "some logic in the request" i must to do.
Sebastien Barathieu
> Message du 11/04/05 22:48
> De : "Leszek Gawron" <[EMAIL PROTECTED]>
> A : [email protected]
> Copie à :
> Objet : Re: upload pdf
>
> "S����������������������������������������������" wrote:
> > Hello,
> >
> > I want to download the pdf issue from the fo transformation on the local disk. I've put the cocoon.xconf property "enabled-upload" at OK and "upload-directory" is fixed, but the pdf file are not stocked on this directory. I give you my sitemap conf:
> > <map:pipeline>
> > <map:match pattern="*.pdf">
> > <map:generate src=""> > > <map:transform src=""> > > <map:serialize type="fo2pdf"/>
> > </map:match>
> > </map:pipeline>
> >
> > I've seen on forum, we can use the <map:act> property, I've tried:
> > <map:act type="request">
> > <map:parameter name="Cache-Control" value="Pragma:no-cache"/>
> > <map:parameter name="Content-Disposition" value="attachment ; filename={1}.xml"/>
> > </map:act>
> > but it doesn't work.
> I think you're mixing two things here:
>
> - uploading the file TO the server (needs enabling upload and doing some
> logic for the request)
>
> - downloading file with the browser to user's hard drive. If you want to
> propmt user with a download dialog box you need to set
> "Content-Disposition" header. Please mind that still some browsers will
> try to outsmart you (i.e. IE :)) and will display the document instead
> of attempting to save it.
>
> --
> Leszek Gawron [EMAIL PROTECTED]
> IT Manager MobileBox sp. z o.o.
> +48 (61) 855 06 67 http://www.mobilebox.pl
> mobile: +48 (501) 720 812 fax: +48 (61) 853 29 65
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
ForwardSourceID:NT0000546E
| Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you |
