From 82744122a23b25d3de43c198c24f5cb90f119b1f Mon Sep 17 00:00:00 2001 From: yishiqihuasheng <1191093413@qq.com> Date: Mon, 3 Jul 2023 11:15:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AF=BC=E5=87=BA=E5=93=8D?= =?UTF-8?q?=E5=BA=94=E5=A4=B4contentType?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/dxhy/core/controller/FtpDownloadController.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dxhy-core/src/main/java/com/dxhy/core/controller/FtpDownloadController.java b/dxhy-core/src/main/java/com/dxhy/core/controller/FtpDownloadController.java index ec87e573..88c856de 100644 --- a/dxhy-core/src/main/java/com/dxhy/core/controller/FtpDownloadController.java +++ b/dxhy-core/src/main/java/com/dxhy/core/controller/FtpDownloadController.java @@ -97,8 +97,9 @@ public class FtpDownloadController extends AbstractController { if ("1".equals(serviceType)) { response.setContentType(this.getContentType(fileName)); } else { - response.setContentType("application/octet-stream"); - response.setContentType("application/vnd.ms-excel"); +// response.setContentType("application/octet-stream"); +// response.setContentType("application/vnd.ms-excel"); + response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); } response.setHeader("Content-disposition", "attachment; filename=" + new String(fileName.getBytes(StandardCharsets.UTF_8), "ISO8859-1"));