in reply to Deferred/selective processing in CGI.pm

You can find the length of the upload by looking at $ENV{CONTENT_LENGTH}. If you call $q->upload_hook or CGI::upload_hook (depending on whether you are using the function interface or OO one) before attempting to read any parameters, then you can arrange for code to be run while it is uploading the files.

That code can try to send notifications back to the user, and you'll know exactly where you are in the process.

Note that you'll have to be very careful of buffering. It is very easy to accidentally buffer your output at various points (in your script or in the webserver) which would result in the user not getting any data until you're all done and are ready to send the main page.

Replies are listed 'Best First'.
Re^2: Deferred/selective processing in CGI.pm
by Anonymous Monk on Oct 30, 2004 at 17:38 UTC
    Thanks, all... These are great suggestions and have definitely given me plenty to work with. I've got a fairly workable solution in place courtesy of T's suggestion to use the QUERY_STRING Env variable. Between that and CONTENT_LENGTH, I'm pretty much dialed in at this point. Thanks, monks!!