Is there a way to add an image property to a ZClass? I created a ZClass to allow users to create a personal profile. The ZClass maintains their user information (name, address, etc.). I would like them to also be able to upload ONE image for their picture. Is there a way to do this and only allow one image? Thanks in advance. Chris __________________________________________________ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/
Chris Bruce writes:
Is there a way to add an image property to a ZClass? Not as a property, but as content:
Make your ZClass an ObjectManager (use this as a BaseClass). Then, you can use "manage_addImage" to add an image to it.
... Is there a way to do this and only allow one image? You give your ZClass your own method to upload the image. This method can check whether there is already an image:
<dtml-if "_.hasattr(aq_explicit,'my_image')"> <!-- already there --> Dieter
participants (2)
-
Chris Bruce -
Dieter Maurer