[Zope] File uploading

Pawel Lewicki lewicki@provider.pl
Tue, 10 Sep 2002 18:45:55 +0200


Hallo,
I have 2 forms in my CMF site (but I suppose that is not a problem). Both of
them have
 <input name="image_file" type="file" >
field. I try to get the file name to add a file(image) with proper id.
When I access str(REQUEST.image_file) in my python script one time I get the
full path to the file and the second time:
<ZPublisher.HTTPRequest.FileUpload instance at 020CF314>
The first one is better for me for explained reason but the files seem not
to be uploading. So it is probably just a name not a file.
The first question is where is the difference? It's probably in the code but
I can't find it. I don't know much about HTTP protocol but the first thing
to check was the type of forms - both are "POST" type.
And the second - how to extract the name of the file and have it uploaded in
the same time?

Pawel Lewicki