Upload component: Process file data.

I am using this demo code

my use case is upload a file
and process the file…
keep user informed on various stage of process using progress monitor.

so what i am doing is the standard stuff that is
from uploadStarted method get the contentLength

and in receiveUpload method
check for the readBytes counter being same as contentLength
then do processing …
This is all good
my problem is as i guess after last byte has been send progress monitor does not calls
so i am not able to update progress monitor with file process update.

Thank you for your time

The code I’m using is below, and seems to work, I think you want to depend on the streamingFinished, to close things off.


                   StreamVariable streamVariable = new StreamVariable() {

                        public OutputStream getOutputStream() {
                            return bas;

                        public boolean listenProgress() {
                            return true;
                        public void onProgress(StreamingProgressEvent event) {
                        	long a = event.getBytesReceived();
                        	long b = event.getContentLength();
                        	float c = (float) a / (float) b;
                        	System.out.println(a + " " + b + " " + c);

                        public void streamingStarted(
                                StreamingStartEvent event) {

                        public void streamingFinished(
                                StreamingEndEvent event) {
                            showFile(fileName, html5File.getType(), bas);

                        public void streamingFailed(
                                StreamingErrorEvent event) {

                        public boolean isInterrupted() {
                            return false;