package com.gkhy.hazmat.admin.controller.system; import com.gkhy.hazmat.common.annotation.RepeatSubmit; import com.gkhy.hazmat.common.api.CommonResult; import com.gkhy.hazmat.system.domain.vo.UploadObjectVO; import com.gkhy.hazmat.system.service.SysCommonService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; @Api(tags = "通用接口前端控制器") @RestController @RequestMapping("/system/common") public class SysCommonController { @Autowired private SysCommonService commonService; @RepeatSubmit @ApiOperation(value = "上传图片/文件(存本地)") @PostMapping("/uploadFile") public CommonResult uploadFile(MultipartFile file){ return CommonResult.success(commonService.uploadFile(file)); } @ApiOperation(value = "删除图片(存本地)") @DeleteMapping("/removeFile") public CommonResult removeFile(@RequestParam(required = true) String path){ return CommonResult.success(commonService.removeFile(path)); } // @ApiOperation(value = "资源管理视频文件上传(不分片)") // @PostMapping("/uploadVideo") // public CommonResult uploadVideo(@RequestPart("file") MultipartFile file) throws Exception { ; // return CommonResult.success(commonService.uploadVideo2M3u8(file)); // } }