Android使用Retrofit技术仿微信图片上传,可以选择多张图片拍照上传
Posted skiwnchhw
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Android使用Retrofit技术仿微信图片上传,可以选择多张图片拍照上传相关的知识,希望对你有一定的参考价值。
android 仿照微信发说说,既能实现拍照,选图库,多图案上传 使用Retrofit技术。
使用方法:详见博客
http://blog.csdn.net/u010046908/article/details/50767904
项目的运行效果:
服务器端接收文件的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);
}
}
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
服务器运行效果:
代码:https://github.com/lidong1665/Android-UploadMultipartImage
再分享一下我老师大神的人工智能教程吧。零基础!通俗易懂!风趣幽默!还带黄段子!希望你也加入到我们人工智能的队伍中来!http://www.captainbed.net
!-->以上是关于Android使用Retrofit技术仿微信图片上传,可以选择多张图片拍照上传的主要内容,如果未能解决你的问题,请参考以下文章