派生自 projectDept/qhighschool

EricsHu
2023-06-19 bc3b37b1622091def1f6ee4c3eb3ff79499b3466
src/main/java/com/qxueyou/scc/controller/HweiYunOBSController.java
@@ -23,6 +23,7 @@
import java.io.InputStream;
import java.net.URLEncoder;
import java.util.List;
import java.util.Map;
/**
 * @ClassName: ObsController
@@ -39,11 +40,12 @@
    private HweiYunOBSService hweiYunOBSService;
    @RequestMapping(value = "upload", method = RequestMethod.POST)
    public List<FileMeta> save(@RequestParam(value = "file", required = false) MultipartFile file) {
    public List<FileMeta> save(@RequestParam(value = "file", required = false) MultipartFile file) throws IOException {
        if (ObjectUtils.isEmpty(file) || file.getSize() <= 0) {
            return null;
        }
//        if (FileUtil.isEmpty(file)) {
//            return new Result(false,"文件为空");
//        }
@@ -52,6 +54,22 @@
        return test;
    }
//    @RequestMapping(value = "fenpian", method = RequestMethod.POST)
//    public  Map<String, Object>  fpsave(@RequestParam(value = "file", required = false) MultipartFile file) throws IOException {
//
//        if (ObjectUtils.isEmpty(file) || file.getSize() <= 0) {
//            return null;
//        }
//
////        if (FileUtil.isEmpty(file)) {
////            return new Result(false,"文件为空");
////        }
////        final List<FileMeta> test = hweiYunOBSService.fileUpload(file, file.getOriginalFilename());
//        Map<String, Object> fnepian = hweiYunOBSService.fnepian(file, file.getOriginalFilename());
////        return ResponseVO.ok("执行成功",test);
//        return fnepian;
//    }
    @RequestMapping(value = "delete", method = RequestMethod.POST)
    public Result delete(@RequestParam(value = "fileName", required = false)  String fileName) {
        if (StrUtil.isEmpty(fileName)) {