Skip to content

Commit

Permalink
!89 修复CAD文件预览错误
Browse files Browse the repository at this point in the history
Merge pull request !89 from 高雄/master
  • Loading branch information
klboke authored and gitee-org committed Apr 18, 2023
2 parents 5236236 + 031db0b commit d3f92b1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/src/main/java/cn/keking/utils/DownloadUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ public static ReturnResponse<String> downLoad(FileAttribute fileAttribute, Strin
logger.error("忽略SSL证书异常:", e);
}
ReturnResponse<String> response = new ReturnResponse<>(0, "下载成功!!!", "");
if (!KkFileUtils.isAllowedUpload(fileName)) {
String realPath = getRelFilePath(fileName, fileAttribute);
if (!KkFileUtils.isAllowedUpload(realPath)) {
response.setCode(1);
response.setContent(null);
response.setMsg("下载失败:不支持的类型!" + urlStr);
Expand All @@ -61,7 +62,6 @@ public static ReturnResponse<String> downLoad(FileAttribute fileAttribute, Strin
response.setMsg(fileName);
return response;
}
String realPath = DownloadUtils.getRelFilePath(fileName, fileAttribute);
if(!StringUtils.hasText(realPath)){
response.setCode(1);
response.setContent(null);
Expand Down

0 comments on commit d3f92b1

Please sign in to comment.