文件上传
This commit is contained in:
+3
-7
@@ -60,6 +60,7 @@ public class OSSFileServiceImpl extends ServiceImpl<OSSFileMapper, OSSFile> impl
|
|||||||
//update-end--Author:scott Date:20201227 for:JT-361【文件预览】阿里云原生域名可以文件预览,自己映射域名kkfileview提示文件下载失败-------------------
|
//update-end--Author:scott Date:20201227 for:JT-361【文件预览】阿里云原生域名可以文件预览,自己映射域名kkfileview提示文件下载失败-------------------
|
||||||
this.save(ossFile);
|
this.save(ossFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 本地文件上传
|
* 本地文件上传
|
||||||
*
|
*
|
||||||
@@ -191,7 +192,6 @@ public class OSSFileServiceImpl extends ServiceImpl<OSSFileMapper, OSSFile> impl
|
|||||||
}
|
}
|
||||||
|
|
||||||
OSSFile oSSFile = new OSSFile();
|
OSSFile oSSFile = new OSSFile();
|
||||||
try {
|
|
||||||
String ctxPath = uploadCospath;
|
String ctxPath = uploadCospath;
|
||||||
String fileName = null;
|
String fileName = null;
|
||||||
String fileType = null;
|
String fileType = null;
|
||||||
@@ -260,10 +260,6 @@ public class OSSFileServiceImpl extends ServiceImpl<OSSFileMapper, OSSFile> impl
|
|||||||
this.save(oSSFile);
|
this.save(oSSFile);
|
||||||
oSSFile.setUrl(null);
|
oSSFile.setUrl(null);
|
||||||
return oSSFile;
|
return oSSFile;
|
||||||
} catch (Exception e) {
|
|
||||||
log.error(e.getMessage(), e);
|
|
||||||
}
|
|
||||||
return oSSFile;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -382,6 +378,7 @@ public class OSSFileServiceImpl extends ServiceImpl<OSSFileMapper, OSSFile> impl
|
|||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<OSSFile> getFileInfoAll(String id) {
|
public List<OSSFile> getFileInfoAll(String id) {
|
||||||
if (com.jero.modules.system.util.StringUtils.isEmpty(id)) {
|
if (com.jero.modules.system.util.StringUtils.isEmpty(id)) {
|
||||||
@@ -414,8 +411,7 @@ public class OSSFileServiceImpl extends ServiceImpl<OSSFileMapper, OSSFile> impl
|
|||||||
try {
|
try {
|
||||||
this.removeById(ossFile.getId());
|
this.removeById(ossFile.getId());
|
||||||
OssBootUtil.deleteUrl(ossFile.getUrl());
|
OssBootUtil.deleteUrl(ossFile.getUrl());
|
||||||
}
|
} catch (Exception ex) {
|
||||||
catch (Exception ex) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user