[Zope] URGENT: Serving a File object from an external method.

Jay, Dylan djay@lucent.com
Thu, 1 Jul 1999 12:33:39 +1000


> -----Original Message-----
> From: Pavlos Christoforou [mailto:pavlos@gaaros.msrc.sunysb.edu]
> Sent: Thursday, July 01, 1999 12:40
> To: Jay, Dylan
> Cc: 'zope@zope.org'
> Subject: Re: [Zope] URGENT: Serving a File object from an external
> method.
> 
> 
> 
> 
> On Thu, 1 Jul 1999, Jay, Dylan wrote:
> 
> If your external method is responsible of returning the 
> binary file then
> something like this might work:
> 
> 
> def generateFile(self,RESPONSE):
> 	' '
> 	RESPONSE['content-type']='application/octet-stream'
> 	bin_data=generate_data() ## the generating function
> 	return bin_data

Thanks, that worked. I mis-understood the way serving up an object worked.