管道基础大数据平台系统开发-【后端】-Server
1
13693261870
2023-03-02 c1c2596883cd00b46fcfc783ab8c2af62e138f01
src/main/java/com/lf/server/service/all/UploadAttachService.java
@@ -139,6 +139,13 @@
     * 下载文件
     */
    public void download(String guid, HttpServletResponse res) {
        download(guid, res);
    }
    /**
     * 下载文件
     */
    public void download(String guid, boolean inline, HttpServletResponse res) {
        try {
            if (StringHelper.isEmpty(guid)) {
                WebHelper.write2Page(res, NO_FILE);
@@ -152,7 +159,7 @@
            }
            String file = pathHelper.getConfig().getUploadPath() + File.separator + entity.getPath();
            WebHelper.download(file, entity.getName(), res);
            WebHelper.download(file, entity.getName(), inline, res);
        } catch (Exception ex) {
            try {
                String msg = JSON.toJSONString(new ResponseMsg<String>(HttpStatus.ERROR, "文件下载出错"));