或将照片拖到这里,单次最多可选300张
// 实例化 uploader = WebUploader.create({ pick: { id: '#filePicker', label: '点击选择图片' }, dnd: '#uploader .queueList', paste: document.body, accept: { title: 'Images', extensions: 'gif,jpg,jpeg,bmp,png', mimeTypes: 'image/*' }, // swf文件路径 [color=red]swf: '/static/js/webuploader/Uploader.swf',[/color] disableGlobalDnd: true, chunked: true, server: '/point/image/bulk.html', fileNumLimit: 300, fileSizeLimit: 50*1024*1024,//5M fileSingleSizeLimit: 5*1024*1024 //1M });
上传文件和普通的spring一样
@RequestMapping("/bulk") @ResponseBody public String bulk(HttpServletRequest request, MultipartFile file) { String path = super.uploadFile(request, "file", true); return "1"; }
引用
Spring MVC3.2开始支持通过Servlet3.0实现文件上传
具体可以看 http://www.cnblogs.com/chenying99/p/3746853.html
![](http1://img.it610.com/image/info5/c4495e8478bb42f4a3879ba025046316.gif)
![](http1://img.it610.com/image/info5/528942bb5b1d453a8b733c9230357955.gif)