25,985
社区成员
发帖
与我相关
我的任务
分享
HttpPost post = new HttpPost(url);
FileBody fileBody = new FileBody( new File(sourcePath));
MultipartEntity multiEntity = new MultipartEntity(HttpMultipartMode.BROWSER_COMPATIBLE);
multiEntity.addPart("file", fileBody);
post.setEntity(multiEntity);
HttpResponse response = httpClient.execute(post);
???