upload file using cgi on Win2k IIS

Jason McWilliams jmcwill at tridog.com
Thu Oct 11 00:52:03 CEST 2001


Ignacio Vazquez-Abrams wrote:
> 
> On Wed, 10 Oct 2001, Jason McWilliams wrote:
> 
> > Ignacio Vazquez-Abrams wrote:
> > >
> > > On Wed, 10 Oct 2001, Jason McWilliams wrote:
> > >
> > > > I seem to be doing everything correctly to save a posted
> > > > multipart/form-data file on IIS server.  Yet, I only
> > > > seem to be able to save a small portion of the file, not
> > > > the whole thing.
> > > >
> > > > The internet user has permission to the temp directory and
> > > > I am not getting any errors.  It works properly with the
> > > > same code on unix, so it must be a IIS thing?
> > > >
> > > > I have tried file.read file.value and also tried to just
> > > > do one line at a time... file.readline .  I can get the
> > > > file name fine using cgiobj.filename  ... etc.
> > > >
> > > > I get about 498 k as the file size on the uploaded file, never
> > > > more and I am trying to upload a big file.  Maybe there is
> > > > a post limit in IIS?  I know that you can set a GET limit.
> > >
> > > What is the value of the hidden field named "MAX_FILE_SIZE" set to? Is there
> > > one at all? If not, then don't expect your file input to work properly.
> >
> > I did not think this variable was used in cgi.py
> > Isnt that a php type thing.  Isn't maxlen set to 0 inside cgi.py
> > to allow for unlimited post length?  That is why I thought
> > it might be a IIS setting somewhere.
> 
> Hmm. I had always thought it was a browser thing, but after doing some
> research I think that you're right. Unfortunately I don't have enough IIS
> knowledge to know exactly which setting it is. It's under the web properties,
> probably, but I have no idea past that.
> 
> FYI, the default value of cgi.maxlen is 0, so that's probably not it.

Here is something interesting.  I can upload .txt and .doc files no
problem,
no matter what the size.  Things die when trying to upload .gif or .zip
or .tgz
or other binaries similar.  Some of it gets uploaded, but only a small
portion?

I am at a loss now.


> 
> --
> Ignacio Vazquez-Abrams  <ignacio at openservices.net>
> 
> --
> http://mail.python.org/mailman/listinfo/python-list




More information about the Python-list mailing list