文件修改
This commit is contained in:
+4
-2
@@ -32,6 +32,8 @@ public class OSSFileServiceImpl extends ServiceImpl<OSSFileMapper, OSSFile> impl
|
||||
|
||||
@Value(value = "${jero.path.upload}")
|
||||
private String uploadpath;
|
||||
@Value(value = "${jero.path.uploadCos}")
|
||||
private String uploadCospath;
|
||||
|
||||
/**
|
||||
* 文件后缀黑名单
|
||||
@@ -188,7 +190,7 @@ public class OSSFileServiceImpl extends ServiceImpl<OSSFileMapper, OSSFile> impl
|
||||
|
||||
OSSFile oSSFile = new OSSFile();
|
||||
try {
|
||||
String ctxPath = uploadpath;
|
||||
String ctxPath = uploadCospath;
|
||||
String fileName = null;
|
||||
String fileType = null;
|
||||
|
||||
@@ -285,7 +287,7 @@ public class OSSFileServiceImpl extends ServiceImpl<OSSFileMapper, OSSFile> impl
|
||||
|
||||
OSSFile oSSFile = new OSSFile();
|
||||
try {
|
||||
String ctxPath = uploadpath;
|
||||
String ctxPath = uploadCospath;
|
||||
String fileName = null;
|
||||
String fileType = null;
|
||||
File file = new File(ctxPath + File.separator + bizPath + File.separator);
|
||||
|
||||
+4
-4
@@ -167,8 +167,8 @@ public class CommonController {
|
||||
// bizPath = "";
|
||||
// }
|
||||
}
|
||||
OSSFile oSSFile = ossFileService.uploadLocal(file, bizPath,state,cut);
|
||||
// OSSFile oSSFile = ossFileService.uploadLocalOfCos(file, bizPath,state,cut); // 切换cos
|
||||
// OSSFile oSSFile = ossFileService.uploadLocal(file, bizPath,state,cut);
|
||||
OSSFile oSSFile = ossFileService.uploadLocalOfCos(file, bizPath,state,cut); // 切换cos
|
||||
if (oConvertUtils.isNotEmpty(oSSFile)) {
|
||||
result.setResult(oSSFile);
|
||||
result.setSuccess(true);
|
||||
@@ -343,7 +343,7 @@ public class CommonController {
|
||||
* @param request
|
||||
* @param response
|
||||
*/
|
||||
// @GetMapping(value = "/downLoadFile")
|
||||
@GetMapping(value = "/downLoadFile")
|
||||
public void downLoadFromCos(String id,HttpServletRequest request, HttpServletResponse response) {
|
||||
if(StringUtils.isBlank(id)){
|
||||
throw new JeroBootException("参数信息不全");
|
||||
@@ -408,7 +408,7 @@ public class CommonController {
|
||||
* @param request
|
||||
* @param response
|
||||
*/
|
||||
@GetMapping(value = "/downLoadFile")
|
||||
// @GetMapping(value = "/downLoadFile")
|
||||
public void downLoadFile(String id,HttpServletRequest request, HttpServletResponse response) {
|
||||
// 查询数据表数据是否存在
|
||||
LambdaQueryWrapper<OSSFile> queryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
Reference in New Issue
Block a user