2

Is there any need to use something other than a http POST for small files? (<1mb)

With large files anyone know of an existing lib to handle them (and preferably show a progress bar in a dialog)

1 Answer 1

3

I've included apache-mime4j-0.6 and httpmime-4.0.1 to get this functionality. With those libraries you can create multipart/form-data requests and send them off with the standard HttpClient.

//total pseudo-code; class names are right, though
HttpPost post;
MulitpartEntity mpe;
mpe.addPart("file", new InputStreamBody() or new FileBody());
post.setEntity(mpe);
httpClient.execute(post);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.