Browse Source

update server/src/main/java/cn/keking/service/impl/OfficeFilePreviewImpl.java.

规范转换格式

Signed-off-by: 高雄 <admin@cxcp.com>
pull/77/head
高雄 2 years ago committed by Gitee
parent
commit
6d3f9e7cfc
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
  1. 2
      server/src/main/java/cn/keking/service/impl/OfficeFilePreviewImpl.java

2
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;

Loading…
Cancel
Save