Hi,
I am using httpclient 3.0 to upload multiples of files via http.
I have been testing using this code:
File f = new File("/path/fileToUpload.txt");
PostMethod filePost = new PostMethod("http://host/some_path";);
Part[] parts = { new StringPart("param_name", "value"), new FilePart(
f.getName(), f) };
filePost.setRequestEntity( new MultipartRequestEntity(parts,
filePost.getParams()) );
HttpClient client = new HttpClient();
int status = client.executeMethod(filePost);

This works well, however I would like to display a progress bar,
and I cant seem to find a call back or anything to track the transfer.
Once the executeMethod is called it doesnt return until the file is
complete.
Any thoughts on how I could track the upload, or do it another way?

Thanks
Dean Krueger

Reply via email to