By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,630 Members | 1,166 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,630 IT Pros & Developers. It's quick & easy.

File Uploads -- Windows Server

P: n/a
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
Jul 18 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Doug Helm wrote:
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
Jul 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.