Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Apache2::Progress Bar problem(s)

by cls33 (Novice)
on Apr 30, 2010 at 14:47 UTC ( [id://837793]=perlquestion: print w/replies, xml ) Need Help??

cls33 has asked for the wisdom of the Perl Monks concerning the following question:

I'm having some trouble getting Apache2::UploadProgress working correctly and I'm hoping someone has some experience with this module and can help me out.

Specifically the problems I'm experiencing are:

1) I'm unable to get the embedded progress bar to work at all. It seems to be constantly updating, i see a constant stream of requests and HTTP 200 responses, but nothing shows up in the output. Firebug shows the following error

[Exception... "'No Jemplate template named "progress.jmpl" available' when calling method: nsIDOMEventListener::handleEvent" nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "<unknown>" data: no]

progress.jmpl is clearly there in the same directory as the js/css files.

2) The pop-up progress bar works (making my wonder why it presumably can find that jmpl file, but the embedded handler cannot..), but after it updates itself two or three times it mysteriously stops and stays at whatever % it's at forever. (unless I manually refresh)

3) I can't change the BaseURI. According to the cpan page I should be able to customize the base URI, but after making the config changes it's still using the JS and CSS files in the extras directory of the module.

my Apache/ModPerl config:

PerlLoadModule Apache2::UploadProgress PerlPostReadRequestHandler Apache2::UploadProgress #this doesn't seem to do anything UploadProgressBaseURI /Progress Alias /Progress/ /home/my user/dev_html/Progress/

my upload script (straight from the cpan page):

use CGI; my $cgi=new CGI; print $cgi->header; print qq~ <html> <body> <script src="/UploadProgress/progress.js"></script> <link type="text/css" href="/UploadProgress/progress.css"/> <form action="ProgressScript.pl" method="post" enctype="multipart/form-data" onsubmit="return startPopupProgressBar(this, {width : 500, heig +ht : 400})"> <input type="file" name="file"/> <input type="submit" name=".submit"/> </form> <div id="progress"></div> </body> </html>~;

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://837793]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-04-25 12:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found