如何上传多个文件asynchttpclient Android问题,怎么解决

2025-04-13 17:31:00
推荐回答(1个)
回答1:

直接实例化多个file传到params里面就可以了
RequestParams params = new RequestParams();
for (int i = 0; i < list.size(); i++) {
try {
params.put("images[" + i + "]", new File(list.get(i)));
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}