[fixed] getRelFilePath 返回null 导致KkFileUtils.isAllowedUpload的空指针异常

This commit is contained in:
lujiaming
2023-08-17 13:56:59 +08:00
parent bb3b5b3dff
commit da784aea84

View File

@@ -49,7 +49,7 @@ public class DownloadUtils {
}
ReturnResponse<String> response = new ReturnResponse<>(0, "下载成功!!!", "");
String realPath = getRelFilePath(fileName, fileAttribute);
if (!KkFileUtils.isAllowedUpload(realPath)) {
if (null == realPath || !KkFileUtils.isAllowedUpload(realPath)) {
response.setCode(1);
response.setContent(null);
response.setMsg("下载失败:不支持的类型!" + urlStr);