疯狂的狮子li
2021-06-22 f098222a43bb37a94563fd83932d8cc2becac1c2
ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java
@@ -54,10 +54,10 @@
            response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
            FileUtils.setAttachmentResponseHeader(response, realFileName);
            FileUtils.writeBytes(filePath, response.getOutputStream());
         FileUtils.writeToStream(filePath, response.getOutputStream());
            if (delete)
            {
                FileUtils.deleteFile(filePath);
            FileUtils.del(filePath);
            }
        }
        catch (Exception e)
@@ -111,7 +111,7 @@
            String downloadName = StrUtil.subAfter(downloadPath, "/",true);
            response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
            FileUtils.setAttachmentResponseHeader(response, downloadName);
            FileUtils.writeBytes(downloadPath, response.getOutputStream());
            FileUtils.writeToStream(downloadPath, response.getOutputStream());
        }
        catch (Exception e)
        {