Code example for CommonsMultipartFile

Methods: getContentTypegetInputStreamgetOriginalFilename

0
		@RequestParam("data") CommonsMultipartFile multipart, HttpServletRequest request,
		HttpServletResponse response) {
		InputStream in = null;
		OutputStream out = null;
		try { 
			in = multipart.getInputStream();
			out = this.store.write(uploadId, multipart.getOriginalFilename(), multipart.getContentType());
			IOUtils.copy(in, out);
			return this.store.getFileBean(uploadId);
		} catch (IOException e) {
			throw new RuntimeException(e.getMessage(), e);
		} finally { 
			IOUtils.closeQuietly(in);
			IOUtils.closeQuietly(out);
		} 
	} 
 
	@RequestMapping(value = "/file/status/{uploadId}", method = RequestMethod.GET)
	@ResponseBody 
	public UploadStatus getUploadStatus(@PathVariable String uploadId) {