|
|
@ -1,13 +1,12 @@
|
|
|
|
package com.ruoyi.file.controller;
|
|
|
|
package com.ruoyi.file.controller;
|
|
|
|
|
|
|
|
|
|
|
|
import com.ruoyi.file.service.IDfsService;
|
|
|
|
import com.ruoyi.file.service.ISysFileService;
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
import io.swagger.annotations.ApiParam;
|
|
|
|
import io.swagger.annotations.ApiParam;
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
import org.slf4j.Logger;
|
|
|
|
import org.slf4j.Logger;
|
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.beans.factory.annotation.Qualifier;
|
|
|
|
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
@ -27,7 +26,7 @@ public class SysFileController {
|
|
|
|
private static final Logger log = LoggerFactory.getLogger(SysFileController.class);
|
|
|
|
private static final Logger log = LoggerFactory.getLogger(SysFileController.class);
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
@Autowired
|
|
|
|
private IDfsService dfsService;
|
|
|
|
private ISysFileService dfsService;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 文件上传请求
|
|
|
|
* 文件上传请求
|
|
|
@ -90,4 +89,4 @@ public class SysFileController {
|
|
|
|
@ApiParam("需要访问的url,字段名:fileUrl,必填;不要带有?后面的参数") @RequestParam(value = "fileUrl") String fileUrl) {
|
|
|
|
@ApiParam("需要访问的url,字段名:fileUrl,必填;不要带有?后面的参数") @RequestParam(value = "fileUrl") String fileUrl) {
|
|
|
|
return R.ok(dfsService.presignedUrl(fileUrl), "获取成功");
|
|
|
|
return R.ok(dfsService.presignedUrl(fileUrl), "获取成功");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|