最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
Android使用Retrofit仿微信多张图片拍照上传
时间:2017-01-17 编辑:简简单单 来源:一聚教程网
Android 仿照微信发说说,既能实现拍照,选图库,多图案上传,使用Retrofit技术。
项目的运行效果:
服务器端接收文件的action
UploadFile.java
代码如下 | 复制代码 |
@Controller publicclassUploadFileextendsActionSupport {
/** * */ privatestaticfinallongserialVersionUID = 1L; privateFile[] file;//文件数组 privateString description;//说说内容 publicFile[] getFile() { returnfile; } publicvoidsetFile(File[] file) { this.file = file; } publicString getDescription() { returndescription; } publicvoidsetDescription(String description) { this.description = description; } @Action("/upload") publicvoidupload() { System.out.println("上传的文件="+Arrays.toString(file)); System.out.println("说说内容="+description); } } |
服务器运行效果:
代码:https://github.com/lidong1665/Android-UploadMultipartImage
相关文章
- sora软件价格介绍 02-22
- sora官网入口地址一览 02-22
- Sora生成的视频使用教程 02-22
- 《梦幻西游》元宵灯谜线索答案大全2024 02-22
- 《原神》有朋自远方来第一天通关攻略 02-22
- 《苏醒之路》四个结局达成攻略 02-22