Nicolas Lehuen
nicolas.lehuen at gmail.com
Fri Mar 25 15:08:01 EST 2005
Like I've wrote in another mail, FieldStorage will stream only if the Content-Disposition header of the file part of the POST entity contains a filename attribute (see mod_python/util.py line 169). Maybe we should change this behaviour : 1) Always stream to disk unless told otherwise 2) Allow to pass a directory name where uploaded files will be streamed ; if not specified a temporary file is used. Regards, Nicolas On Fri, 25 Mar 2005 09:18:30 -0700, Craig Warren <craig.warren at encorp.com> wrote: > Also be aware that it doesn't stream it in (unless someone can tell me > how to make it stream in), so it seems to read it all into memory (which > might be your slowness, if it has to write to swap a lot) before it > writes it to a tmp file. We have had problems with this since we are > running on an embedded system that doesn't have a swap, so we run out of > memory. I have been writing a handler that streams in the file, but > have not completed it yet. We switched to using WebDav to upload big > files, but you can't really do it from a web interface, but it works > over port 80 and "streams" the files in, which is nice. > > Craig > > > Barry Pearce wrote: > > > Hi, > > > > I am uploading a 155Mb file to my python handler (just using > > PythonHandler). The handler uses FieldStorage. However the time > > between the browser reporting the upload as complete, and *my* handler > > being called is quite excessive! > > > > Any ideas on where to investigate further? Does anyone know the > > particular area of code internals? > > > > Im concerned because I need to upload in GB!!!! > > _______________________________________________ > Mod_python mailing list > Mod_python at modpython.org > http://mailman.modpython.org/mailman/listinfo/mod_python >
|