commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leena Kulkarni <leenadi...@yahoo.com>
Subject [file upload] Progress Listener
Date Wed, 11 Apr 2007 09:07:49 GMT
Has anyone implemented the commons file upload progres
listener?

1. Can it be used only with streaming API and not
normal upload?
2. Not sure where to put the following code referred
on the site under watch progress:

//Create a progress listener
ProgressListener progressListener = new
ProgressListener(){
   public void update(long pBytesRead, long
pContentLength, int pItems) {
       System.out.println("We are currently reading
item " + pItems);
       if (pContentLength == -1) {
           System.out.println("So far, " + pBytesRead
+ " bytes have been read.");
       } else {
           System.out.println("So far, " + pBytesRead
+ " of " + pContentLength
                              + " bytes have been
read.");
       }
   }
};
upload.setProgressListener(progressListener);


Also Im note sure to transform these sysouts into
something to show actually on the upload page.

Regards,
Leena


       
____________________________________________________________________________________
No need to miss a message. Get email on-the-go 
with Yahoo! Mail for Mobile. Get started.
http://mobile.yahoo.com/mail 

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message