[Zope-dev] How to return downloadable content from Python Method

Blandford, Simon [BSS Audio UK] Simon.Blandford@bss.co.uk
Fri, 8 Jun 2001 11:06:27 +0100


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C0F002.AEADCB00
Content-Type: text/plain;
	charset="iso-8859-1"

I am compressing files which need to be uncompressed inline before download.
The DTML <href=...> calles a python method in the product which returns the
uncompressed file data. Say this file is an MSWord document, how do I return
this as a file to download? Presently, the browser just tries to display the
binary file and makes a mess of it.
 
Regards,
Simon B.

------_=_NextPart_001_01C0F002.AEADCB00
Content-Type: text/html;
	charset="iso-8859-1"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">


<META content="MSHTML 5.00.3315.2870" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2><SPAN class=024500210-08062001>I am compressing 
files which need to be uncompressed inline before download. The DTML 
&lt;href=...&gt; calles a python method in the product which returns the 
uncompressed file data. Say this file is an MSWord document, how do I return 
this as a file to download? Presently, the browser just tries to display the 
binary file and makes a mess of it.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=024500210-08062001></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=024500210-08062001>Regards,</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=024500210-08062001>Simon 
B.</SPAN></FONT></DIV></BODY></HTML>

------_=_NextPart_001_01C0F002.AEADCB00--