diff --git a/src/main/java/kcc/com/cmm/web/EgovFileDownloadController.java b/src/main/java/kcc/com/cmm/web/EgovFileDownloadController.java index 26847bea..689046c2 100644 --- a/src/main/java/kcc/com/cmm/web/EgovFileDownloadController.java +++ b/src/main/java/kcc/com/cmm/web/EgovFileDownloadController.java @@ -433,7 +433,7 @@ public class EgovFileDownloadController { String s_path = (String) commandMap.get("path"); String s_file = (String) commandMap.get("file"); - File uFile = new File(pdfFilePath + "/resultFile/" + s_path, s_file); + File uFile = new File(pdfFilePath + "/resultFile/", s_file); String mimetype = "application/x-msdownload"; diff --git a/src/main/java/kcc/com/pdf/service/impl/PdfServiceImpl.java b/src/main/java/kcc/com/pdf/service/impl/PdfServiceImpl.java index 003d9d51..ecc52509 100644 --- a/src/main/java/kcc/com/pdf/service/impl/PdfServiceImpl.java +++ b/src/main/java/kcc/com/pdf/service/impl/PdfServiceImpl.java @@ -1,5 +1,6 @@ package kcc.com.pdf.service.impl; +import java.io.UnsupportedEncodingException; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.time.LocalDateTime; @@ -210,7 +211,11 @@ public class PdfServiceImpl extends EgovAbstractServiceImpl implements PdfServic options.getOption().add(option); mergeTask.getOptions().add(options); - fileNames.append("%2C%20%3C%2Fbr%3E" + t.getFileName()); + try { + fileNames.append("%2C%20%3C%2Fbr%3E" + URLEncoder.encode(t.getFileName(), StandardCharsets.UTF_8.toString())); + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + } } );