|
|
@ -5,6 +5,7 @@ import com.bnyer.common.core.domain.R; |
|
|
import com.bnyer.file.config.ImgConfig; |
|
|
import com.bnyer.file.config.ImgConfig; |
|
|
import com.bnyer.file.dto.FileDto; |
|
|
import com.bnyer.file.dto.FileDto; |
|
|
import com.bnyer.file.dto.FileUploadDto; |
|
|
import com.bnyer.file.dto.FileUploadDto; |
|
|
|
|
|
import com.bnyer.file.dto.FileUrlDto; |
|
|
import com.bnyer.file.service.IFileService; |
|
|
import com.bnyer.file.service.IFileService; |
|
|
import com.bnyer.file.service.IQiniuService; |
|
|
import com.bnyer.file.service.IQiniuService; |
|
|
import com.bnyer.file.service.MinioService; |
|
|
import com.bnyer.file.service.MinioService; |
|
|
@ -12,6 +13,7 @@ import com.bnyer.file.utils.ImgUtil; |
|
|
import com.bnyer.file.vo.ChekFileVo; |
|
|
import com.bnyer.file.vo.ChekFileVo; |
|
|
import io.swagger.annotations.Api; |
|
|
import io.swagger.annotations.Api; |
|
|
import io.swagger.annotations.ApiOperation; |
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
|
|
import io.swagger.annotations.ApiParam; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import org.apache.poi.util.IOUtils; |
|
|
import org.apache.poi.util.IOUtils; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
@ -83,8 +85,8 @@ public class SysFileController { |
|
|
} |
|
|
} |
|
|
@ApiOperation(value="文件删除") |
|
|
@ApiOperation(value="文件删除") |
|
|
@PostMapping("/deleteFile") |
|
|
@PostMapping("/deleteFile") |
|
|
public R deleteFile(@RequestParam String url) throws IOException { |
|
|
public R deleteFile(@RequestBody @ApiParam("上传url对象") FileUrlDto params) throws IOException { |
|
|
String res = qiniuService.deleteFile(url); |
|
|
String res = qiniuService.deleteFile(params.getUrl()); |
|
|
// 上传并返回访问地址
|
|
|
// 上传并返回访问地址
|
|
|
return R.ok(res); |
|
|
return R.ok(res); |
|
|
} |
|
|
} |
|
|
|