导出优化

This commit is contained in:
zhanglipeng
2021-10-18 16:41:52 +08:00
parent 0c166b4b04
commit 2cf6432f3d

View File

@ -60,8 +60,15 @@ public class CommonController {
throw new Exception(StringUtils.format("文件名称({})非法,不允许下载。 ", fileName));
}
//String realFileName = System.currentTimeMillis() + fileName.substring(fileName.indexOf("_") + 1);
String filePath = RuoYiConfig.getDownuploadPath() + fileUrlPath;
filePath=filePath.replace("/profile/","");
// String filePath = RuoYiConfig.getDownuploadPath() + fileUrlPath;
// filePath=filePath.replace("/profile/","");
String filePath = "";
if (fileUrlPath.equals("undefined")) {
filePath = RuoYiConfig.getDownloadPath() + fileName;
} else {
filePath = RuoYiConfig.getDownuploadPath() + fileUrlPath.replace("/profile/", "");
}
System.out.println("filepath" + filePath);
@ -145,6 +152,7 @@ public class CommonController {
/**
* 获取七牛资源地址
*
* @param URL 上传的资源名称
*/
public String privateDownloadUrl(String URL) {