[Zope] Uploading images - no image!

Etienne Labuschagne etiennel@geospace.co.za
Fri, 4 May 2001 11:25:04 +0200


Yes, but even if I change that to image/jpeg it still doesn't show - I'll
double check.

Etienne

-----Original Message-----
From: Peter Bengtsson [mailto:mail@peterbe.com]
Sent: Friday, May 04, 2001 11:18 AM
To: Etienne Labuschagne
Cc: zope@zope.org
Subject: Re: [Zope] Uploading images - no image!


Do you have
enctype="multipart/form-data"
???


----- Original Message -----
From: "Etienne Labuschagne" <etiennel@geospace.co.za>
To: "Zope user list (E-mail)" <zope@zope.org>
Sent: Friday, May 04, 2001 9:32 AM
Subject: [Zope] Uploading images - no image!


> Hi there
>
> The Python Method (not external Python Method!) below must upload an image
> after being given the id, title and filename (on the client computer).
This
> should work the same way as the management interface based image
uploading.
> Somehow, this function causes the image to be created, but is seems to
> contain no image data (you cannot view the image).  What am I doing wrong?
>
>
> (self is passed as the only parameter.  id, title and file are set in the
> calling form)
>
> id = self.REQUEST['id']
> title = self.REQUEST['title']
> file = self.REQUEST['file']
>
> self.manage_addProduct['OFSP'].manage_addImage(id,file,title)
>
> return "Your image is uploaded."
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )