On 2/9/06, Edi Weitz edi@agharta.de wrote:
This should not happen. Maybe you're using older versions of TBNL here? The code which is responsible for the streaming was inadvertently left out from some released versions.
I forget what version of tbnl I was testing with, but it was the latest one when I tried it. I'll report back when I have time to do this test again.
What you describe seems to be the usual way to do it. I also did something similar once for a mod_perl application.
As far as changing RFC2388 is concerned, it would be nice if we could convince Janis to add the changes to his distributions (and therefore make them unobtrusive so they won't bother non-TBNL users).
I spent sometime reading the perl code by Raditha Dissanayake (http://www.raditha.com/php/progress.php) and implementede the same idea in tbnl.
Basically, before the user submits a file, we need to create a unique identifier (at least unique for each user) and associate this id with the form post request.
We then pass this id to a popup page so it can poll the uploading progress.
Since the file upload will be part of a multipart/form-data stream, it's easier to pass the id in the query string and rearrange the initialization order of the get-parameters and post-parameters. This way by the time we are saving the file (post-parameters) we'll have the id ready (get-parameters).
There might be a cleaner way to do this but I don't know better. Please take a look and feel free to change it or make it sucks less (I'm not trying to create more work for Edi or anyone though).
TBNL is really a lot more fun than other web frameworks I've used.
Cheers, -- Mac