[Zope] FileUpload and Python Script
Tom Deprez
tom.deprez@village.uunet.be
Sun, 17 Jun 2001 23:52:03 +0200
Yes, these are all correct.
I found the problem. It was a very stupid thing! See one of previous
messages on the list.
Tom.
----- Original Message -----
From: "Dieter Maurer" <dieter@handshake.de>
To: "Tom Deprez" <tom.deprez@village.uunet.be>
Cc: <zope@zope.org>
Sent: Sunday, June 17, 2001 9:25 PM
Subject: Re: [Zope] FileUpload and Python Script
> Tom Deprez writes:
> > Can somebody help me on how I can get the filename of a FileUpload
object in
> > a python script?
> >
> > When using following code in a python script,
> >
> > context.REQUEST['accessory_image'].filename
> >
> > I get always the following error :
> >
> > Error Type: AttributeError
> > Error Value: 'string' object has no attribute 'filename'
> "REQUEST['accessor_image'] is a string and not a FileUpload
> instance.
>
> Are you sure, you followed the preconditions for file upload?
>
> * method='post'
>
> * enctype='multipart/form-data'
>
> * input type=file
>
>
> Dieter