Я хочу загружать изображения и отправлять их под разными именами.
Отправлять изображения успешно, но с оригинальным именем:
httpPostuplod = new HttpPost(URL);
MultipartEntity multiPart = new MultipartEntity(HttpMultipartMode.BROWSER_COMPATIBLE);
for (int i = 0; i < imglist.size(); i++) {
System.out.println(imglist.get(i));
File file = new File(imglist.get(i));
// multiPart.addPart("IMG_"+Constants_Fix.postImgcount+".png", new FileBody(new File(imglist.get(i))));
ContentBody cbFile = new FileBody(file, "image/png");
multiPart.addPart("IMG_"+Constants_Fix.postImgcount+".png",cbFile);
Constants_Fix.postImgcount++;
}
httpPostuplod.setEntity(multiPart);
HttpResponse resuplod = httpclient.execute(httpPostuplod);