You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by S�bastien Barathieu <se...@wanadoo.fr> on 2005/04/06 13:50:00 UTC
upload pdf
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.
Thank you for help.
Sébastien Barathieu
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: upload pdf
Posted by Leszek Gawron <lg...@mobilebox.pl>.
"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 lgawron@mobilebox.pl
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: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org