UploadFilter

14 views
Skip to first unread message

tweekgeek

unread,
Aug 4, 2006, 10:13:41 AM8/4/06
to cherrypy-devel
Hey everyone... I've just finished up a filter that might help in the
way of preventing some problems with CP2.2 and file uploads.
Specifically, it's currently possible for a user to tie up all the
available threads with file uploads, preventing other users from
accessing the site. This filter allows a user to set a maximum number
of simultaneous uploads...

In addition to that, since I was playing around with uploads, I decided
to add some functionality to the FieldStorage object used by CP. After
including this filter the FieldStorage object will allow a user to keep
track fo the progress of uploads, enabling a progress bar of sorts to
be implemented (so long as multiple threads are available, of course).
Here's a screen capture of the included sample:

http://www.kepty.com/static/screenshot.jpg

Other features include configurations for file sizes (overriding cp
sizecheck wrappers), uploading time caps, minimum upload speed
requirements, and explicit declaration of areas that accept file
uploads. All of which are well documented in the filter's doc string.
Well, here's the download:

http://www.kepty.com/static/uploadfilter-1.0.tar.gz (filter and sample
implementation)

It might make a good addition to the third-party module list, or,
depending on what you guys think, I personally think it might be good
to include this or something similar (maybe with just the simultaneous
upload limiting) in the cp2.2 code base itself.

As always, feel free to e-mail me (james at tweekedideas dot com), or
catch me in the cp irc: tweekgeek.

James

Robert Brewer

unread,
Aug 4, 2006, 12:39:06 PM8/4/06
to cherryp...@googlegroups.com
tweekgeek wrote:
> Hey everyone... I've just finished up a filter that
> might help in the way of preventing some problems
> with CP2.2 and file uploads.

Very nice! I wish I had time at the moment to work this into CP, but I don't. If you'd file a ticket for CP 3 and assign it to me, I'd make sure to address this before CP 3 final. Add the actual .py as an attachment, if you would.


Robert Brewer
System Architect
Amor Ministries
fuma...@amor.org

winmail.dat
Reply all
Reply to author
Forward
0 new messages