日志里把具体的文件加上吧 issues/I3BJDQ

pull/7482/head^2 v2.4.3
zhangdaiscott 2021-04-01 09:44:47 +08:00
parent 02abd5c803
commit ef762ff21f
1 changed files with 1 additions and 1 deletions

View File

@ -219,7 +219,7 @@ public class CommonController {
File file = new File(filePath);
if(!file.exists()){
response.setStatus(404);
throw new RuntimeException("文件不存在..");
throw new RuntimeException("文件["+imgPath+"]不存在..");
}
response.setContentType("application/force-download");// 设置强制下载不打开
response.addHeader("Content-Disposition", "attachment;fileName=" + new String(file.getName().getBytes("UTF-8"),"iso-8859-1"));