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:
Also Im note sure to transform these sysouts into something to show actually on the upload page.
Regards,
Leena
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:
Code:
//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);
Regards,
Leena