aFinal框架上传多张图片问题?
时间: 2014-12-08来源:开源中国
前景提要
HDC调试需求开发(15万预算),能者速来!>>>
aFinal框架开发android应用很方便,我最近在用碰到了一个上次图片的问题
当选择多张图片发布到服务器上时,afinal里的写法是这样: AjaxParams params = new AjaxParams (); params . put( " username " , " michael yang " ); params . put( " password " , " 123456 " ); params . put( " email " , " test@tsz.net " ); params . put( " profile_picture " , new File ( " /mnt/sdcard/pic.jpg " )); // 上传文件 params . put( " profile_picture2 " , inputStream); // 上传数据流 params . put( " profile_picture3 " , new ByteArrayInputStream (bytes)); // 提交字节流 FinalHttp fh = new FinalHttp (); fh . post( " http://www.yangfuhai.com " , params, new AjaxCallBack (){ @Override public void onLoading ( long count , long current ) { textView . setText(current + " / " + count); } @Override public void onSuccess ( String t ) { textView . setText(t == null ? " null " : t); } }); 将图片当参数传给服务器,都是不同名字的,可服务器接收的是多张图片文件的数组,不知道afinal里该怎么拼装数据,当一个参数发送给服务器,纠结很久了,还是没找到好的方法,希望能得到android大大们帮助

科技资讯:

科技学院:

科技百科:

科技书籍:

网站大全:

软件大全:

热门排行