use of org.springframework.web.multipart.commons.CommonsMultipartResolver in project gocd by gocd.
the class FakeArtifactPublisherServlet method doPost.
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
CommonsMultipartResolver multipartResolver = new CommonsMultipartResolver();
MultipartHttpServletRequest httpServletRequest = multipartResolver.resolveMultipart(request);
Map<String, MultipartFile> map = httpServletRequest.getFileMap();
MultipartFile multipartFile = map.values().iterator().next();
receivedFiles.add(multipartFile.getOriginalFilename());
}
use of org.springframework.web.multipart.commons.CommonsMultipartResolver in project symmetric-ds by JumpMind.
the class RestConfig method multipartResolver.
@Bean
public MultipartResolver multipartResolver() {
CommonsMultipartResolver multipartResolver = new CommonsMultipartResolver();
multipartResolver.setMaxUploadSize(50000000);
return multipartResolver;
}
Aggregations