views:

358

answers:

1

I am trying to use ProgressListener update call to obtain percentage completion of each file. Number of files are dynamically chosen and uploaded.

public class ProgressListenerImpl implements ProgressListener

Will I be able to use the "item" parameter in the update call?

update(long bytesRead, long contentLength, int item)

And associate them to each iframe dynamically created in UI? Is there alternative suggestions that are easier or simpler in nature?

The application has to be in Java hosted on Google App Engine. I am not saving files to any filesystem but using the stream to redirect data to Google sites.

A: 

Your code isn't called until the entire request has been received - so no, you can't monitor upload progress from the server end.

Nick Johnson
Do you mean to say theres no way to get feedback from "upload attachment" feed of sites?
dhaval
I don't know what you mean by that. The server end cannot get upload progress, because it isn't called until all the data has arrived at the server. If you want client-side progress notifications, you need to use a Flash or JavaScript widget that supports them.
Nick Johnson
Yes, I need a client side progress and I am using a Flash for same. My question was to know the progress after form post is done and server starts to upload the file to Google site. Hope I am more clear.
dhaval
Your app is invoked as soon as the browser finishes sending the request. There is no progress to be informed about.
Nick Johnson
The progress is in two parts 1. FILE FORM submit 2. FILE FEED UPDATE to google site. Point 1 is handled by flash. For point 2 Is there a ATOM tag to check update progress?
dhaval
As I just said, your app is invoked as soon as the file finishes uploading from the client. There's no progress to check!
Nick Johnson