From 6d3f9e7cfc2df0e72ae2d062fd4fbc076995f2b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AB=98=E9=9B=84?= Date: Tue, 21 Mar 2023 06:02:40 +0000 Subject: [PATCH] =?UTF-8?q?update=20server/src/main/java/cn/keking/service?= =?UTF-8?q?/impl/OfficeFilePreviewImpl.java.=20=E8=A7=84=E8=8C=83=E8=BD=AC?= =?UTF-8?q?=E6=8D=A2=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 高雄 --- .../main/java/cn/keking/service/impl/OfficeFilePreviewImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/main/java/cn/keking/service/impl/OfficeFilePreviewImpl.java b/server/src/main/java/cn/keking/service/impl/OfficeFilePreviewImpl.java index b90be1cd..751eaf88 100644 --- a/server/src/main/java/cn/keking/service/impl/OfficeFilePreviewImpl.java +++ b/server/src/main/java/cn/keking/service/impl/OfficeFilePreviewImpl.java @@ -47,7 +47,7 @@ public class OfficeFilePreviewImpl implements FilePreview { String fileName = fileAttribute.getName(); String filePassword = fileAttribute.getFilePassword(); String userToken = fileAttribute.getUserToken(); - boolean isHtml = suffix.equalsIgnoreCase("xls") || suffix.equalsIgnoreCase("xlsx") || suffix.equalsIgnoreCase("csv"); + boolean isHtml = suffix.equalsIgnoreCase("xls") || suffix.equalsIgnoreCase("xlsx") || suffix.equalsIgnoreCase("csv") || suffix.equalsIgnoreCase("xlsm") || suffix.equalsIgnoreCase("xlt") || suffix.equalsIgnoreCase("xltm") || suffix.equalsIgnoreCase("et") || suffix.equalsIgnoreCase("ett") || suffix.equalsIgnoreCase("xlam"); String pdfName = fileName.substring(0, fileName.lastIndexOf(".") + 1) + (isHtml ? "html" : "pdf"); String cacheFileName = userToken == null ? pdfName : userToken + "_" + pdfName; String outFilePath = FILE_DIR + cacheFileName;