Browse Source

Merge remote-tracking branch 'origin/pre' into pre

yangdamao 1 year ago
parent
commit
22caa3ea9d

+ 2 - 2
zhongzheng-admin/src/main/java/com/zhongzheng/controller/CommonController.java

@@ -187,7 +187,7 @@ public class CommonController extends BaseController {
             throws Exception {
             throws Exception {
         try {
         try {
             if (!FileUtils.checkAllowDownload(resource)) {
             if (!FileUtils.checkAllowDownload(resource)) {
-                throw new Exception(StrUtil.format("资源文件({})非法不允许下载。 ", resource));
+                throw new Exception(StrUtil.format("资源文件({})非法,不允许下载。 ", resource));
             }
             }
             // 本地资源路径
             // 本地资源路径
             String localPath = RuoYiConfig.getProfile();
             String localPath = RuoYiConfig.getProfile();
@@ -198,7 +198,7 @@ public class CommonController extends BaseController {
             response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
             response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
             FileUtils.setAttachmentResponseHeader(response, downloadName);
             FileUtils.setAttachmentResponseHeader(response, downloadName);
             FileUtils.writeBytes(downloadPath, response.getOutputStream());
             FileUtils.writeBytes(downloadPath, response.getOutputStream());
-            
+
         } catch (Exception e) {
         } catch (Exception e) {
             log.error("下载文件失败", e);
             log.error("下载文件失败", e);
         }
         }