From 5b8b787e6a87feb733ca88ab2b848b7c315cb471 Mon Sep 17 00:00:00 2001 From: Lim Jonguk Date: Tue, 29 Mar 2022 18:38:30 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20source=20=EC=A0=95=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/xit/biz/ctgy/controller/CtgyFileMgtController.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/xit/biz/ctgy/controller/CtgyFileMgtController.java b/src/main/java/com/xit/biz/ctgy/controller/CtgyFileMgtController.java index fa76bea..d5abede 100644 --- a/src/main/java/com/xit/biz/ctgy/controller/CtgyFileMgtController.java +++ b/src/main/java/com/xit/biz/ctgy/controller/CtgyFileMgtController.java @@ -3,7 +3,6 @@ package com.xit.biz.ctgy.controller; import com.xit.biz.ctgy.dto.MinInfoBoard680Dto; import com.xit.biz.ctgy.entity.MinInfoBoard680; -import com.xit.biz.ctgy.entity.MinSimsa680; import com.xit.biz.ctgy.service.ICtgyFileService; import com.xit.core.api.IRestResponse; import com.xit.core.api.RestResponse; @@ -95,8 +94,10 @@ public class CtgyFileMgtController { byte[] fileByte = FileUtils.readFileToByteArray(new File(absFile)); + response.setContentType("application/octet-stream"); - response.setHeader("Content-Disposition", "attachment; fileName=\"" + URLEncoder.encode(entity.getInFilename(), StandardCharsets.UTF_8)+"\";"); + //response.setHeader("Access-Control-Allow-Credentials", "true"); + response.setHeader("Content-Disposition", "attachment; filename=\"" + URLEncoder.encode(entity.getInFilename(), StandardCharsets.UTF_8)+"\";"); response.setHeader("Content-Transfer-Encoding", "binary"); response.setHeader("Content-Length", String.valueOf(entity.getInFilesize()));