Hi guys,
I have written a piece of code in an application that uploads a file to a
location, if provided with path of a file. What i am missing is a way to
show the percentage of file uploaded. I am using apache's http library for
this purpose (found it on the internet). The relevant code is here:
final File file = new
File(filePathToUpload);
final HttpClient client = new
DefaultHttpClient();
...
...
String postURL= Constants.BASE_URL;
HttpPost post = new HttpPost(postURL);
FileBody bin = new FileBody(file);
MultipartEntity reqEntity = new
MultipartEntity(HttpMultipartMode.BROWSER_COMPATIBLE);
reqEntity.addPart("myFile", bin);
post.setEntity(reqEntity);
client.execute(post);
I need help/suggestions with how do, if i can, get an output stream, if
that would help, from the HttpClient and get the number of bytes sent?
Is it even possible with httpClient?
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en