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>~;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Apache2::Progress Bar problem(s)
by Anonymous Monk on May 01, 2010 at 01:56 UTC |