diff --git a/src/main/java/com/glxp/api/idc/controller/IdcController.java b/src/main/java/com/glxp/api/idc/controller/IdcController.java index 8eac70e9..d70d4cdf 100644 --- a/src/main/java/com/glxp/api/idc/controller/IdcController.java +++ b/src/main/java/com/glxp/api/idc/controller/IdcController.java @@ -112,7 +112,6 @@ public class IdcController { response.setContentType("application/force-download"); idcService.downloadFile(fileName, response); } - } @RequestMapping("/mapi/**") diff --git a/src/main/java/com/glxp/api/idc/service/impl/IdcServiceImpl.java b/src/main/java/com/glxp/api/idc/service/impl/IdcServiceImpl.java index 333f28af..9c146844 100644 --- a/src/main/java/com/glxp/api/idc/service/impl/IdcServiceImpl.java +++ b/src/main/java/com/glxp/api/idc/service/impl/IdcServiceImpl.java @@ -629,7 +629,8 @@ public class IdcServiceImpl implements IdcService { public void downloadFile(String fileName, HttpServletResponse response) { OutputStream os; String filePathSlash = filePath.substring(filePath.length() - 1).equals("/") ? "" : fileName.substring(0, 1).equals("/") ? "" : "/"; - String sourceFileName = filePath +filePathSlash+imagePath +fileName; +// String sourceFileName = filePath +filePathSlash+imagePath +fileName; + String sourceFileName = fileName; try { if (FileUtils.isFileExist(sourceFileName)) { byte[] bytes = FileUtils.readFileByBytes(sourceFileName);