I'm uploading a multipart chunk of data using HttpPost and feeding it into an HttpClient objects execute method as follows:
HttpPost loginPost = new HttpPost(LOGIN_URL);
List<NameValuePair> params = new ArrayList<NameValuePair>();
params.add(new BasicNameValuePair("_email", mEmailAddress));
params.add(new BasicNameValuePair("lpassword", mPassword));
UrlEncodedFormEntity entity = new UrlEncodedFormEntity(params, "UTF-8");
loginPost.setEntity(entity);
HttpResponse resp = mHttpClient.execute(loginPost);
HttpPost post = new HttpPost(UPLOAD_URL);
FileBody bin = new FileBody(file);
MultipartEntity me = new MultipartEntity();
me.addPart("stuff", new StringBody(stuff));
me.addPart("file", bin);
post.setEntity(new RequestEntityEx(me, handler));
mHttpClient.execute(post);
Now, logging in and posting work - fine but uploading is painfully slow. I've tested my internet connection and it's far slower than what it should be (approx. up speed is 1Mb/s, uploading a 3MB file is taking around 5 minutes (rather than 30s).
Anyone have any ideas?