On Mon, Mar 20, 2000 at 05:26:45PM -0500, Pearson, Brian Edward (GEA, 056278) wrote:
Can anyone provide some insight regarding the problem detailed below? Basically, I would like to add file attachment support to the ZDiscussion product. I have managed to do that successfully, however I cannot seem to create a URL to access the file such that it could be wrapped inside an HREF tag.
Any/all assistance would be greatly appreciated. Also, if I am crazy for doing this please let me know. Perhaps a new ZDiscussion already exists that supports attachments?
IMVHO you're throwing away the simplicity and flexibility (and Zope-Zen) that make ZDiscussions great. Q. How do you add a file to a Zope object? A. Make the object folder-like and drop a File object in there. This way you can make it an Image instead if you wish, or any other Zope object your heart feels like enabling (if you subclass ObjectManager instead of Folder, you can choose which classes of sub-objects are acceptable) and support more than one attachment easily. The ZD Topic object is already folderlike. The only thing you need is a folderlike ZDItem (by creating a ZClass combining ZDItem and ObjectManager), and then write forms and constructors that do the hard work of attaching. []s, |alo +---- -- Hack and Roll ( http://www.hackandroll.org ) News for, uh, whatever it is that we are. http://www.webcom.com/lalo mailto:lalo@hackandroll.org pgp key in the personal page Debian GNU/Linux --- http://www.debian.org Brazil of Darkness --- http://zope.gf.com.br/BroDar