Uploading a file using HttpClient

All your problems with Audio, Video and Images.

Uploading a file using HttpClient

Postby jovish.edathi » Thu Oct 13, 2011 5:09 pm

I am uploadig a file to server using HttpClient and Async Task . I want to show the progress of file upload. How to get the upload % ? I am attaching my code below.

Code: Select all
   HttpClient  client = new DefaultHttpClient();
           HttpPost httppost  = new HttpPost(server url);
            FileEntity fileEntity = new FileEntity(Uploading file, "binary/octet-stream");
              HttpResponse response = client.execute(httppost);
             }catch(Exception ex){

I am doing this in doInBackground() method. I know how to update the progress but I don't know how to get the progress status?
Posts: 30
Joined: Mon Oct 25, 2010 8:55 am


Return to Multimedia Problems

Who is online

Users browsing this forum: No registered users and 3 guests