www
Jinquan_Ou
2023-03-21 07328cf8cd53fbc90c70de8113bcfa6b528ebf82
zhang-content/src/main/java/com/ruoyi/service/impl/DownLoadFileServiceImpl.java
@@ -20,7 +20,7 @@
    private String basePath;
    @Override
    public AjaxResult downLoadFile(String path, HttpServletResponse response) {
    public void downLoadFile(String path, HttpServletResponse response) {
        path=basePath+path.substring(8);
        File file = new File(path);
@@ -40,7 +40,6 @@
                while(bis.read(buffer) != -1){
                    os.write(buffer);
                }
                return AjaxResult.success("操作成功");
            }
        }catch (Exception e) {
            e.printStackTrace();
@@ -57,6 +56,5 @@
                e.printStackTrace();
            }
        }
        return AjaxResult.error("操作失败");
    }
}