Peter Bengtsson schrieb:

#id1,title1  image id and  tile
def doAddPhoto(id1, title1):
   # some comments
   ....

   img = context.getObjectById(id1) # this returns the object part of
object item array from context.objectItems
   s="ph" +str(id1)
   context.manage_addPhoto(id=s, file=img.data,title=title1,
displays=None, precondition='', content_type='image/jpeg') (line 12)

It should be:
product_context = context.manage_addProduct['Photo']
product_context.manage_addPhoto(id=s, ......)

Not so obvious to know :(
You can get hints like this by viewing the source of any ZMI page that
has the Add object drop down.


Thanks, that works,

but in addition there is an photo.manage_upload(file=img.data) necessary too see the images.

Regards
Thomas Adams



begin:vcard
fn:Thomas Adams
n:Adams;Thomas
adr;quoted-printable:;;Schwanthalerstr. 184;M=C3=BCnchen;Bayern;80339;Deutschland
email;internet:[EMAIL PROTECTED]
tel;work:089 55 186 500
tel;home:089 54 03 28 96
version:2.1
end:vcard

_______________________________________________
Zope maillist  -  Zope@zope.org
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 )

Reply via email to