[Zope] Serving up and Image (resolved)

Paul Winkler pw_lists at slinkp.com
Thu Jun 3 12:20:41 EDT 2004


On Thu, Jun 03, 2004 at 07:43:33AM -0400, Small Business Services wrote:
> From: "Paul Winkler" <pw_lists at slinkp.com>
> > In any case, I'd again suggest calling
> > isrc.index_html(request, RESPONSE).
> > It scales much better to large images.
> >
> > Your method will read the entire image data into memory as a string
> > and not return anything to the client until it is done.
> > Image.index_html() will stream the data in chunks as they are loaded
> > from the ZODB.  This uses less memory and is faster.
> 
> Thanks for the feedback Paul,
> 
> I'd like to try your isrc.index_html() idea, what should index_html
> (script/method?) contain?

It already exists. index_html is a method provided by the Image class.
It is defined in lib/python/OFS/Image.py.

-- 

Paul Winkler
http://www.slinkp.com



More information about the Zope mailing list