[Zope] how can I force download of a word document as a file and not have it calling word?

Phil Harris Phil Harris" <phil@harris-family.info
Mon, 15 Apr 2002 13:35:12 +0100


That makes no difference as far as I can see, as soon as Windows sees the
.doc extensions it will fire up Word to receive the file.

Windows sets more store in the file extension than the mime type.


----- Original Message -----
From: "Andreas Heckel" <andreas@easyleading.org>
To: "Robert Rottermann" <robert@redcor.ch>
Cc: <zope@zope.org>
Sent: Monday, April 15, 2002 1:28 PM
Subject: Re: [Zope] how can I force download of a word document as a file
and not have it calling word?


> Robert Rottermann wrote:
> >
> > When I have a file object that contains a word doc "viewing" it fires up
> > word and displays the document.
> > What I really want is that the save file dialog is presented. So how can
I
> > suppress the default behavior?
>
> You can set the content-type of the RESPONSE to
> application/octet-stream.
> Example:
>
> <dtml-call
>
"REQUEST['RESPONSE'].setHeader('content-type','application/octet-stream')">
>
> Andreas Heckel
> andreas@easyleading.org
>
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )