[Zope-DB] Re:Displaying BLOB's with Zope

Matthew T. Kromer matt@zope.com
Thu, 30 Jan 2003 13:55:15 -0500


Mark Evans wrote:

>Thanks to Matt, Charlie and Martin for their comments.
>
>I tried this with the following code based on Matt's suggestion:
>
>   <dtml-call RESPONSE.setHeader('content-type','image/jpeg')>
>   <dtml-var expr="getImage().image.read()">
>
>and received the following error:
>
>      Error Type: AttributeError
>      Error Value: Results instance has no attribute 'Image'
>
>I'm not sure how to resolve that.
>  
>


Eh, thats what I get for composing code in email... it should have been 
<dtml-var expr="getImage()[0].image.read()"> since you need the first 
row of the result's image; the recordset as a whole doesn't have an 
image attribute.