plupload -- multiple file upload & Spring MVC
Here is the code of the method that is used to process the uploaded files (note: this is just test code that I‘ve been playing around with so it needs some fixing, but it‘ll get you up and running):
public ModelAndView upload(HttpServletRequest request, HttpServletResponse response) throws Exception {
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
MultiValueMap<String, MultipartFile> map = multipartRequest.getMultiFileMap();
if(map != null) {
Iterator iter = map.keySet().iterator();
while(iter.hasNext()) {
String str = (String) iter.next();
List<MultipartFile> fileList = map.get(str);
for(MultipartFile mpf : fileList) {
//do something by mpf
}
}
}
return null;
}
link to http://forum.spring.io/forum/spring-projects/web/94851-html5-multiple-file-upload-spring-mvc
本文出自 “六度空间” 博客,请务必保留此出处http://jasonwalker.blog.51cto.com/7020143/1394456
plupload -- multiple file upload & Spring MVC,古老的榕树,5-wow.com
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。