[Zope-DB] Re:Displaying BLOB's with Zope
Mark Evans
mark.evans.b@bayer.com
Thu, 30 Jan 2003 09:58:46 -0800
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.
>Perhaps when you return photo[0].image you really need to return
photo[0].image.read().
I made this change to the python script and it worked! I can now call the image
from the code:
<img src='retrieveImage'> and it displays properly. Thank you very much for the
tidbit. I would still like to know what needs to be done to display from an
external method, but this kind of python script will work for now.
Regards,
Mark Evans