liyong
14 小时以前 b2089cc76bdf959a2e9ff71142dc3fcf0bd9b80b
src/main/java/com/ruoyi/project/common/CommonController.java
@@ -53,15 +53,14 @@
                throw new Exception(StringUtils.format("文件名称({})非法,不允许下载。 ", fileName));
            }
            String realFileName = System.currentTimeMillis() + fileName.substring(fileName.indexOf("_") + 1);
            String filePath = RuoYiConfig.getDownloadPath() + fileName;
            response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
            FileUtils.setAttachmentResponseHeader(response, realFileName);
            FileUtils.writeBytes(filePath, response.getOutputStream());
            if (delete)
            {
                FileUtils.deleteFile(filePath);
            }
            FileUtils.writeBytes(fileName, response.getOutputStream());
//            if (delete)
//            {
//                FileUtils.deleteFile(fileName);
//            }
        }
        catch (Exception e)
        {