cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leszek Gawron <lgaw...@mobilebox.pl>
Subject Re: upload pdf
Date Mon, 11 Apr 2005 20:47:50 GMT
"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


Mime
View raw message