cgiupload.py

Daniel Ridings Daniel.Ridings at holding.gu.se
Sun May 16 03:41:59 EDT 1999


I cannot for the life of me figure out how cgiupload.py works. I don't have
trouble with the basics of cgi, but I have trouble with the two classes, one
for the server and one for the client and figuring out who is listening to
what and when.

Can anyone give me a clue as to how a simpliest implementation of this would
work? I can fill in the form, browse around on with the client browser, pick
a file, post the form, get the file name, but then cgiupload.py tells me it
cannot open the file name. It seems that it treats the file name as if it
were on the server machine and not on the client machine.

Of course I'm doing something wrong here and it's not a problem with the
module. It's a problem with my understanding. (There is no documentation
with the module).

By default the method process doesn't do anything. That's ok. Can someone
step me through the simpliest form of posting the form, getting the
filename, uploading it, process it by doing nothing (the default)?

My form looks like:

<form enctype="multipart/form-data" action="/cgi-bin/cgiupload.py"
method="post">
File: <input type="file" name="filename">
<input type="submit" value="Submit">
</form>

I can read the form, but not do anything sensible with the filename I get.
Any clues?

Thanks,
Daniel Ridings







More information about the Python-list mailing list