[mod_python] Mike's psp upload

Mike Looijmans nlv11281 at natlab.research.philips.com
Mon Feb 20 01:37:03 EST 2006


Hmm. I tested and indeed, the program does not work any more.

The problem is NOT that FileCounter does not supply a read() method though. There's no reason for 
any object to 'read' the file, it's just writing it.

The problem is that mod_python seems to have forgotten somewhere that this is a file upload and not 
a simple name=value pair. You would not want to upload a 1GB file with this - it will eat 1GB of RAM 
for that. Looks like an old bug has returned to bite us.

Mike Looijmans
Philips Natlab / Topic Automation


Daniel Nogradi wrote:
> Mike Looijmans has posted not so long ago a potentially very useful
> psp script to handle 'streamed' file uploads:
> http://modpython.org/pipermail/mod_python/2006-February/020248.html
> 
> With the latest mod_python 3.2.7 installed it doesn't work because the
> FileCounter class has no method 'read' which is apparently needed by
> util.py (makes sense, one wants to be able to read the content of the
> uploaded file). Is that example script really broken or am I missing
> something?




More information about the Mod_python mailing list