[Zope-dev] Writing results directly back to browser

Pavlos Christoforou pavlos@gaaros.msrc.sunysb.edu
Thu, 11 Nov 1999 13:23:29 -0500 (EST)


On Thu, 11 Nov 1999, David S. Harrison wrote:

> 
> Maybe I am not being clear.  There is no image file.  It will be generated

No you were clear ...


> completely from within the external method.  I would like the external
> method to write to some sort of sink that will deliver the bits
> directly to the browser.  If I can help it, I don't want the image
> to be written to disk at all.

Still I will repeat the original recipe ;-)

> > 
> > def gen_im(self):
> >         imag=<code to generate image on the fly>
> >         return imag
> > 

access it like:

http://Zobjects.in.the.mirror.appear.harder/myfolder/gen_im

ok maybe you need to set:
RESPONSE.setHeader('content-type','<your image type'>) before you return
the object

Pavlos