Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
XP is just a number
 
PerlMonks  

Re: Yet another progress bar.

by Kanji (Parson)
on May 29, 2002 at 01:50 UTC ( [id://169986]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


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.


Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://169986]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.