diff --git a/jodconverter-web/src/main/java/cn/keking/service/impl/PdfFilePreviewImpl.java b/jodconverter-web/src/main/java/cn/keking/service/impl/PdfFilePreviewImpl.java index bd33daab..7e0a8f7a 100644 --- a/jodconverter-web/src/main/java/cn/keking/service/impl/PdfFilePreviewImpl.java +++ b/jodconverter-web/src/main/java/cn/keking/service/impl/PdfFilePreviewImpl.java @@ -39,7 +39,7 @@ public class PdfFilePreviewImpl implements FilePreview{ String decodedUrl=fileAttribute.getDecodedUrl(); String suffix=fileAttribute.getSuffix(); String fileName=fileAttribute.getName(); - String officePreviewType = model.asMap().get("officePreviewType") == null ? "" : model.asMap().get("officePreviewType").toString(); + String officePreviewType = model.asMap().get("officePreviewType") == null ? ConfigConstants.getOfficePreviewType() : model.asMap().get("officePreviewType").toString(); String originUrl = model.asMap().get("originUrl").toString(); model.addAttribute("pdfUrl", url); String pdfName = fileName.substring(0, fileName.lastIndexOf(".") + 1) + "pdf";