新增配置项office.preview.switch.disabled,控制offic文件预览切换开关

This commit is contained in:
kl
2020-12-25 18:19:30 +08:00
committed by kl
parent 4a3886e41a
commit d787813bc6
9 changed files with 27 additions and 4 deletions

View File

@ -44,6 +44,7 @@ public class PdfFilePreviewImpl implements FilePreview {
String baseUrl = BaseUrlFilter.getBaseUrl();
String pdfName = fileName.substring(0, fileName.lastIndexOf(".") + 1) + "pdf";
String outFilePath = FILE_DIR + pdfName;
model.addAttribute("switchDisabled", ConfigConstants.getOfficePreviewSwitchDisabled());
if (OfficeFilePreviewImpl.OFFICE_PREVIEW_TYPE_IMAGE.equals(officePreviewType) || OfficeFilePreviewImpl.OFFICE_PREVIEW_TYPE_ALL_IMAGES.equals(officePreviewType)) {
//当文件不存在时,就去下载
if (!fileUtils.listConvertedFiles().containsKey(pdfName) || !ConfigConstants.isCacheEnabled()) {