[Zope] Images from database into html
Sven Syld
Sven.Syld@stat.ee
Wed, 22 Aug 2001 17:48:13 +0300
Hello,
I have gained access to a employees' database which among other stuff =
contains employees' photos (that is, in binary form). I'm trying to =
display employees with their names and photos etc.=20
To this moment I have figured out only one solution (which does not work).
HTML page looks like this:
<dtml-in sql_employees>
<dtml-var first_name> <dtml-var last_name> <img src=3D"his_or_her_photo">=
(which is DTML method)
<br>
</dtml-in>
DTML method his_or_her_photo:
<dtml-call "RESPONSE.setHeader('Content-Type','image/gif')"> (just in =
case, but this apparently has no effect)
<dtml-var photo>
Since his_or_her_photo is under sql_employees it should return person's =
photo. I understand that problem is that src inside <img> isn't rendered =
by Zope but by browser?
Any hint would be appreciated.
Sven S=FCld