如何上传多个文件asynchttpclient Android问题,怎么解决
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();
}
}
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();
}
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询