| | |
| | | private HweiYunOBSService hweiYunOBSService; |
| | | |
| | | @RequestMapping(value = "upload", method = RequestMethod.POST) |
| | | public Result save(@RequestParam(value = "file", required = false) MultipartFile file) { |
| | | public List<FileMeta> save(@RequestParam(value = "file", required = false) MultipartFile file) { |
| | | |
| | | if (ObjectUtils.isEmpty(file) || file.getSize() <= 0) { |
| | | return new Result(false,"文件为空"); |
| | | return null; |
| | | } |
| | | // if (FileUtil.isEmpty(file)) { |
| | | // return new Result(false,"文件为空"); |
| | | // } |
| | | final List<FileMeta> test = hweiYunOBSService.fileUpload(file, file.getOriginalFilename()); |
| | | // return ResponseVO.ok("执行成功",test); |
| | | return new Result(true,"success",test); |
| | | return test; |
| | | } |
| | | |
| | | @RequestMapping(value = "delete", method = RequestMethod.POST) |