jose carlos schrieb:
Hi all,
i'm trying to show a Image object in dtml but i don known how to do it.
i have a user object and this user have a jpg foto atributte.
this foto atributte is a instance of OFS.Image and when i try to view in
dtml only view Ascii character..
i think about to create a temporary file and then in dtml use that url
but i dont like that solution.
i would like hear any ideas..
<img src="/path/to/userobject/imageattribute" witdh="..." height="..." alt="the
user" />
maybe?
If you cant access the userobject by path, a small wrapper (python script)
should do it:
if traverse_subpath:
return context.acl_users.getUser(traverse_subpath[0]).imageattribute.data
then you can have above link in your HTML image tag like
/path/to/the/pythonscript/userid
which would return, when called by the subsequent browser request,
just the image data.
_______________________________________________
Zope maillist - [email protected]
http://mail.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )