提交 ef762ff2 编写于 作者: JEECG低代码平台's avatar JEECG低代码平台

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

上级 02abd5c8
...@@ -219,7 +219,7 @@ public class CommonController { ...@@ -219,7 +219,7 @@ public class CommonController {
File file = new File(filePath); File file = new File(filePath);
if(!file.exists()){ if(!file.exists()){
response.setStatus(404); response.setStatus(404);
throw new RuntimeException("文件不存在.."); throw new RuntimeException("文件["+imgPath+"]不存在..");
} }
response.setContentType("application/force-download");// 设置强制下载不打开 response.setContentType("application/force-download");// 设置强制下载不打开
response.addHeader("Content-Disposition", "attachment;fileName=" + new String(file.getName().getBytes("UTF-8"),"iso-8859-1")); response.addHeader("Content-Disposition", "attachment;fileName=" + new String(file.getName().getBytes("UTF-8"),"iso-8859-1"));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册