From db2d781e21955ea86f756c4eefd6d0fc06f78af8 Mon Sep 17 00:00:00 2001 From: admin Date: Mon, 3 Apr 2023 10:43:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E4=BB=B6=E4=B8=8B=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/glxp/sale/admin/idc/controller/IdcController.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api-admin/src/main/java/com/glxp/sale/admin/idc/controller/IdcController.java b/api-admin/src/main/java/com/glxp/sale/admin/idc/controller/IdcController.java index 5a41b38..514426e 100644 --- a/api-admin/src/main/java/com/glxp/sale/admin/idc/controller/IdcController.java +++ b/api-admin/src/main/java/com/glxp/sale/admin/idc/controller/IdcController.java @@ -90,8 +90,10 @@ public class IdcController { public void downloadFile(HttpServletResponse response,@RequestParam String fileName) throws UnsupportedEncodingException { if (fileName != null) { response.setHeader("Content-disposition", "attachment; filename=" + URLEncoder.encode(fileName, "UTF-8")); + response.setContentType("application/octet-stream"); + idcService.downloadFile(fileName, response); } - idcService.downloadFile(fileName, response); + }