File Uploads -- Windows Server

D

Doug Helm

I should have been more clear in my subject line. I was also the poster in
the "File Uploads" topic. I'm not having any luck getting file uploads to
work (multi-part HTML form) on a Windows server. I'm using a very close
approximation of public domain code that I found. I've tried a couple of
different implementations (very similar), but I am essentially using the
following test code:

http://www.voidspace.org.uk/python/cgi.shtml#upload

which does *not* work on my Windows / IIS server. I have CGIs (py and pyc
files) configured as follows:

C:\Python\Python.Exe -u %s %s

C:\Python is (of course) where Python is installed on my machine.
-u allows for binary data to be processed (I believe)
I'm not sure what %s %s does (would be nice to know...)

Anyway, I believe I have write permissions in the directory that I'm trying
to write (and would expect an error if I didn't)...

I'm not getting any error. I submit a multi-part form to save a file
attachment to disk, and the post just hangs.

Does anyone have any ideas on this? Has anyone made CGI file uploads work
in a Windows / IIS environment?

Thanks much for any help that you can provide.

Doug
 
?

=?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=

Doug said:
I'm not getting any error. I submit a multi-part form to save a file
attachment to disk, and the post just hangs.

You really should look into debugging this. Are you sure your script
is called? To be sure, make the script create a file in c:\tmp.
Is the file being created?

Next, you said you want to know what the command line is. Print sys.argv
to the file. While you are at it, also print os.environ to the file.

Add a print statement after every chunk of code in your CGI script.
Maybe you are getting an exception that is not logged anywhere?

In short, you really have to find out yourself what is going on in your
script. Very few people use IIS (most use Apache instead), so you are
pretty much on your own.

Regards,
Martin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,240
Members
46,829
Latest member
KimberAlli

Latest Threads

Top