/** * 上传彩信附件 * * @param file * @param type 附件类型 pic-图片 sound-声音文件 * @return * @throws IOException */ @RequestMapping( value = "single_upload", headers = "content-type=multipart/*", produces = "text/html", method = RequestMethod.POST) @ResponseBody public Object singleUpload( @RequestParam("mmsupfile") MultipartFile file, @RequestParam("type") String type) throws IOException { logUtils.logView(MODULE_NAME, "上传文件"); InputStream is = file.getInputStream(); String fileName = FilenameUtils.getName(file.getOriginalFilename()); return contentService.uploadFile(fileName, type, is); }
@RequestMapping(value = "jpye_cxqf_single_crop", method = RequestMethod.GET) @ResponseBody public Object singleCrop(HttpServletRequest request) throws IOException { logUtils.logView(MODULE_NAME, "裁剪图片"); return contentService.singleCrop(request); }