新增配置项office.preview.switch.disabled,控制offic文件预览切换开关
This commit is contained in:
@ -54,6 +54,7 @@ public class OfficeFilePreviewImpl implements FilePreview {
|
||||
boolean isHtml = suffix.equalsIgnoreCase("xls") || suffix.equalsIgnoreCase("xlsx");
|
||||
String pdfName = fileName.substring(0, fileName.lastIndexOf(".") + 1) + (isHtml ? "html" : "pdf");
|
||||
String outFilePath = FILE_DIR + pdfName;
|
||||
model.addAttribute("switchDisabled", ConfigConstants.getOfficePreviewSwitchDisabled());
|
||||
// 判断之前是否已转换过,如果转换过,直接返回,否则执行转换
|
||||
if (!fileUtils.listConvertedFiles().containsKey(pdfName) || !ConfigConstants.isCacheEnabled()) {
|
||||
String filePath;
|
||||
|
||||
Reference in New Issue
Block a user