我在doInBackground
,
InputStream in = null;
DefaultHttpClient httpclient = new DefaultHttpClient();
try {
System.out.println("calling API here");
HttpPost httppost = new HttpPost("my url");
MultipartEntity reqEntity = new MultipartEntity();
if (imageList != null) {
for(int i=0;i<imageList.size();i++) {
File f= new File(imageList.get(i));
in = new BufferedInputStream(new FileInputStream(f));
reqEntity.addPart("file[]",f.getName(), in);
}
}
reqEntity.addPart("mobile",owner_mobile);
reqEntity.addPart("reg_code",reg_code);
reqEntity.addPart("book_id",book_id);
reqEntity.addPart("adv_amount",advAmountValue);
httppost.setEntity(reqEntity);
HttpResponse response = httpclient.execute(httppost);
问题是当我向multiple image(s)
发送server
时,只有第一张图片(for e.g, 23457352.jpg)
正在发送其他人不是。{/ p>
是谁能帮我解决这个问题?
提前谢谢......
答案 0 :(得分:0)
尝试在属性名称中使用索引。
operator int() const