RE: [Zope] ZClasses:
-----Original Message----- From: Darran Edmundson [mailto:Darran.Edmundson@anu.edu.au] Sent: Monday, September 20, 1999 6:24 AM To: zope@zope.org Subject: [Zope] ZClasses:
<!--#with "DImageClass.createInObjectManager(REQUEST['id'], REQUEST)"--> <dtml-call "REQUEST.set('current_date', ZopeTime())"> <dtml-call "REQUEST.set('date', current_date )"> <dtml-call "propertysheets.DImageProperties.manage_editProperties(REQUEST)"> <dtml-if file> <dtml-call "manage_addImage('default_image', file, '')"> </dtml-if> <!--#/with-->
This does create an Image object but the content is of type "plain/text" and the size is only 30 bytes (suspiciously close to the string length of the file specifier). Is it necessary to create the image object *and* upload the image data in two separate calls?
No.
Presumably "file" in the addImage method above contains the data stream but I cannot figure out how to access it (manage_upload(file) doesn't work).
Try 'file.read()'. 'file' will just return <class FileObject...> BTW, please don't sent HTML or RTF formatted messages to the list. -Michel
participants (1)
-
Michel Pelletier