I'm developing a Web 2.0 CMS for Turbogears right now and I'm working on a file uploader with a progress bar. I'm sure I'm not the only one searching for a good solution to this.
The difficulty is that your turbogears controller isn't getting called until *after* the file is already downloaded by CherryPy, so there's no way to monitor the file progress. Or is there? James (aka tweekgeek) has created a filter in CherryPy that adds additional functionality to CherryPy's FieldStorage class (the class that handles file uploads). Not only does his filter support monitoring the file progress, it also adds some much-needed security that allows you to limit the memory, disk space, and threads used by the file uploading processes. And as a bonus, it doesn't even use an IFrame like most popular approaches (dojo, yahoo ui, etc)! I'll have to test his solution in a full browser regimen (using browsercam) before I go with this, but have a look: Take a look at his screenshot of the progress bar: http://www.kepty.com/static/screenshot.jpg or download his code, which includes a filter and a sample app: http://www.kepty.com/static/uploadfilter-1.0.tar.gz Fumanchu (the CherryPy maintainer) suggested he will integrate this (or something similar) into CherryPy 3 (as a CherryPy 3 'hook', instead of the to-be-depricated filters). I can work this into TurboGears as a patch and a new widget, but I fear it would be rejected because a) it's all going to have to change with the release of cherrypy 3, and b) I'm going to have to add a 'get_file_upload_statistics' method (or something similar) to the RootController class, which there is no precedent for. Could someone who is committing code comment on this and give me some feedback? I'd love to code this up for public use! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~----------~----~----~----~------~----~------~--~---

