in reply to Yet another progress bar.
I've only just started dabbling with mod_perl, but it looks like Apache::Request->new's UPLOAD_HOOK argument might be of use...
- UPLOAD_HOOK
Sets up a callback to run whenever file upload data is read. This can be used to provide an upload progress meter during file uploads. Apache will automatically continue writing the original data to $upload->fh after the hook exits.
However, I think the real trick will be "streaming" your progress meter back to the client as I've never had much luck in getting the browser to read anything back from the window or frame it's uploading to until after the upload is done.
However, mod_perl certainly gives you a much finer control of interaction than CGIs, so you might have some joy there or with nph although personally I've had much success using multiple windows (the progress window being launched via JavaScript) or frames, and then employing some sort of communication between the upload and progress processes, with the window/frame for the latter refreshing often.
--k.
|
|---|