| | |
| | | |
| | | //import cn.hutool.core.io.FileUtil; |
| | | import com.obs.services.exception.ObsException; |
| | | import com.obs.services.model.PutObjectResult; |
| | | import com.qxueyou.scc.base.model.FileMeta; |
| | | import com.qxueyou.scc.base.model.Result; |
| | | import com.qxueyou.scc.teach.res.service.HweiYunOBSService; |
| | | import org.springframework.util.ObjectUtils; |
| | |
| | | * @Version: 1.0 |
| | | */ |
| | | @RestController |
| | | @RequestMapping({ "file" })// @RequestMapping("/file") |
| | | @RequestMapping("/file")// @RequestMapping("/file") |
| | | public class HweiYunOBSController { |
| | | |
| | | @Resource |
| | |
| | | // if (FileUtil.isEmpty(file)) { |
| | | // return new Result(false,"文件为空"); |
| | | // } |
| | | final String test = hweiYunOBSService.fileUpload(file, file.getOriginalFilename()); |
| | | final List<FileMeta> test = hweiYunOBSService.fileUpload(file, file.getOriginalFilename()); |
| | | // return ResponseVO.ok("执行成功",test); |
| | | return new Result(true,"success",test); |
| | | } |