예제 #1
0
 /**
  * 2.14 活动图片上传
  *
  * @param attach 图片资源文件
  * @param request 请求参数
  * @return 返回上传结果
  */
 @RequestMapping(
     value = "/activity/cover/upload",
     method = RequestMethod.POST,
     headers = "Content-Type=multipart/form-data")
 public ResponseDo uploadCoverPhoto(
     @RequestParam("attach") MultipartFile attach,
     @RequestParam("token") String token,
     @RequestParam("userId") String userId) {
   LOG.info("uploadCoverPhoto attach size: {}", attach.getSize());
   try {
     return service.uploadCoverPhoto(attach, userId, token);
   } catch (ApiException e) {
     LOG.warn(e.getMessage(), e);
     return ResponseDo.buildFailureResponse(e.getMessage());
   }
 }