当前位置: 移动技术网 > 移动技术>移动开发>Android > Android使用Retrofit仿微信多张图片拍照上传

Android使用Retrofit仿微信多张图片拍照上传

2019年07月24日  | 移动技术网移动技术  | 我要评论
android 仿照微信发说说,既能实现拍照,选图库,多图案上传,使用retrofit技术。 使用方法:详见 项目的运行效果: 服务器端接收文件的action

android 仿照微信发说说,既能实现拍照,选图库,多图案上传,使用retrofit技术。

使用方法:详见

项目的运行效果:

服务器端接收文件的action

uploadfile.java

@controller
public class uploadfile extends actionsupport {

 /**
 * 
 */
 private static final long serialversionuid = 1l;

 private file[] file;//文件数组
 private string description;//说说内容
 public file[] getfile() {
 return file;
 }
 public void setfile(file[] file) {
 this.file = file;
 }


 public string getdescription() {
 return description;
 }
 public void setdescription(string description) {
 this.description = description;
 }
 @action("/upload")
 public void upload() {
 system.out.println("上传的文件="+arrays.tostring(file));
 system.out.println("说说内容="+description);
 }



}

服务器运行效果:

代码:https://github.com/lidong1665/android-uploadmultipartimage

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持移动技术网。

如您对本文有疑问或者有任何想说的,请点击进行留言回复,万千网友为您解惑!

相关文章:

验证码:
移动技术网