Upload File + ProgressBar

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Upload File + ProgressBar

frijolita
Hi all,

I'm using httpclient class to connect my stand-alone application with a
servlet which performs a file upload.
Everything works fine but ... I would like to display a progressBar to
indicate the upload progress ...

Is it possible? Right now I only interact with the server part to send the
request and get the final response after file uploading....


Thanks!
Regards
T
Reply | Threaded
Open this post in threaded view
|

Re: Upload File + ProgressBar

serff
Yes, it is possible.  You have to implement your own FilePart class
though (which really isn't that hard).  Just extend FilePart and then
override the sendData method.  If you want a real easy way to do it,
wrap the InputStream in a ProgressMonitorInputStream.  That is how I did
it.  Hope that helps!

Andrew
Tatiana Lloret Iglesias wrote:

> Hi all,
>
> I'm using httpclient class to connect my stand-alone application with a
> servlet which performs a file upload.
> Everything works fine but ... I would like to display a progressBar to
> indicate the upload progress ...
>
> Is it possible? Right now I only interact with the server part to send
> the
> request and get the final response after file uploading....
>
>
> Thanks!
> Regards
> T
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]