"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="{1}.xml"/>
<map:transform src="principal.xsl"/>
<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]



Reply via email to