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()));