我正在使用多方上传视频文件和数据。如何显示进度条并在一键值中上传数组值?
我正在使用以下代码:
DefaultHttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost(Call_Server.REPLAY_VIDEO);
MultipartEntity mpEntity = new MultipartEntity(
HttpMultipartMode.STRICT);
mpEntity.addPart("FILE_UPLOAD", new FileBody(videofile));
mpEntity.addPart("message_id", new StringBody(recipient_id));
mpEntity.addPart("recipient_email", new StringBody(recipient_email2));
totalSize = (int) mpEntity.getContentLength();
System.out.println(totalSize + ":::::totalSize");
httppost.setEntity(mpEntity);
HttpResponse response = httpclient.execute(httppost);
HttpEntity resEntity = response.getEntity();