You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Lionel Crine <cr...@4dconcept.fr> on 2003/09/11 18:05:24 UTC

[Help] Downloading file into local Disk

Hi,

I'd like my browser web not to display the xml document but to open a 
download popup.

I hae created a serializer with a mime-type set to binary/octet-stream, but 
when I try :
<map:match pattern="save.xml">
   <map:generate type="file" src="toto.xml"/>
   <map:serializer type="save"/>
</map:match>


the browser display the document.

Else if I try to write <map:match pattern="save.t"> instead, the download 
popup comes up!!!

Any idea ?

Thanks
Lionel



Lionel CRINE
Société : 4DConcept
22 rue Etienne de Jouy 78353 JOUY EN JOSAS
Tel : 01.34.58.70.70 Fax : 01.39.58.70.70


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


Re: [Help] Downloading file into local Disk

Posted by Stephan Niedermeier <ma...@logabit.com>.
Hello Lionel,

it seems to me that your browser looks at first for the suffix of the
recived document and then for the mime-type. Do you use IE? In my opinion,
the only way to solve this problem is to zip the xml file before sending or
to change the config of your browser, if possible.

Regards
Stephan

----- Original Message ----- 
From: "Lionel Crine" <cr...@4dconcept.fr>
To: <us...@cocoon.apache.org>
Sent: Thursday, September 11, 2003 6:05 PM
Subject: [Help] Downloading file into local Disk


Hi,

I'd like my browser web not to display the xml document but to open a
download popup.

I hae created a serializer with a mime-type set to binary/octet-stream, but
when I try :
<map:match pattern="save.xml">
   <map:generate type="file" src="toto.xml"/>
   <map:serializer type="save"/>
</map:match>


the browser display the document.

Else if I try to write <map:match pattern="save.t"> instead, the download
popup comes up!!!

Any idea ?

Thanks
Lionel



Lionel CRINE
Société : 4DConcept
22 rue Etienne de Jouy 78353 JOUY EN JOSAS
Tel : 01.34.58.70.70 Fax : 01.39.58.70.70


---------------------------------------------------------------------
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


RE: [Help] Downloading file into local Disk

Posted by Nicolas Toper <nt...@jouve.fr>.
you need to change the Mime type to application/x-download or for NS
application/octet-stream (you need to check about the exact Mime type).

I don't know how to change the header with Cocoon but I guess someone can
help :=)

> -----Message d'origine-----
> De : Lionel Crine [mailto:crine@4dconcept.fr]
> Envoyé : jeudi 11 septembre 2003 18:05
> À : users@cocoon.apache.org
> Objet : [Help] Downloading file into local Disk
>
>
> Hi,
>
> I'd like my browser web not to display the xml document but to open a
> download popup.
>
> I hae created a serializer with a mime-type set to
> binary/octet-stream, but
> when I try :
> <map:match pattern="save.xml">
>    <map:generate type="file" src="toto.xml"/>
>    <map:serializer type="save"/>
> </map:match>
>
>
> the browser display the document.
>
> Else if I try to write <map:match pattern="save.t"> instead, the download
> popup comes up!!!
>
> Any idea ?
>
> Thanks
> Lionel
>
>
>
> Lionel CRINE
> Société : 4DConcept
> 22 rue Etienne de Jouy 78353 JOUY EN JOSAS
> Tel : 01.34.58.70.70 Fax : 01.39.58.70.70
>
>
> ---------------------------------------------------------------------
> 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