httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dan Rossi" <dan...@electroteque.org>
Subject RE: [users@httpd] Apache Upload Meter
Date Wed, 11 Dec 2002 09:40:09 GMT
this is what i have done but with ming flash as the progress bar , much more
pretty , so it isnt a real progress bar , coz you still have to wait till
the files are up on the server first if you havent noticed that.

-----Original Message-----
From: Issac Goldstand [mailto:margol@beamartyr.net]
Sent: Wednesday, December 11, 2002 7:47 PM
To: users@httpd.apache.org
Subject: Re: [users@httpd] Apache Upload Meter



----- Original Message -----
From: "daniel" <daniel@electroteque.org>
> , but any other ways would be excellent to find out, it only
> starts happening once all the files are on the server

That's exactly the point of Apache::UploadMeter - it's a server-side
progress bar which works WHILE the file is being uploaded.

> but gives an indication
> what is happening , ie for processing the temp files and moving over,
image
> processing and resizing etc ..

Trivial:  Simply flush information to the browser as it gets done on the
server.  I have an application which uses this elegant way of doing it with
simple JavaScript:

// Functions for upload debug output
function init_carp_form()
{
  document.write('<FORM NAME="carp"><TABLE><TR><TD>Status</TD><TD><INPUT
NAME="c
stat" TYPE="TEXT" SIZE=50 VALUE="Please
wait..."></TD></TR><TR><TD>Filename</TD>
<TD><INPUT NAME="cfile" TYPE="TEXT" SIZE=50 VALUE="Please
wait..."</TD></TR><TR>
<TD>MD5</TD><TD><INPUT NAME="cdigest" TYPE="TEXT" SIZE=50 VALUE="Please
wait..."
></TD></TR></TABLE></FORM>');
}
function carp_status(newstatus)
{
  document.carp.cstat.value=newstatus;
}
function carp_filename(newname)
{
  document.carp.cfile.value=newname;
}
function carp_md5(newmd5)
{
  document.carp.cdigest.value=newmd5;
}

Then, my server-side aplication simply needs to call:

r->print("<SCRIPT LANGUAGE='JavaScript'>carp_status('Something
happening');</SCRIPT><BR/>");

which can be easily put into a subroutine in the C library to make for even
less keystrokes...  The <BR/> is there because some browsers, like MSIE,
won't flush their input buffer to the GUI until it gets one.  I've never
quite figured out why.

  Issac


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message