更新XML文件预览UI风格,调整类文本预览架构,更方便扩展

This commit is contained in:
kl
2020-12-28 14:50:05 +08:00
committed by kl
parent dac3606b4e
commit bce9a624d7
10 changed files with 230 additions and 92 deletions

View File

@ -57,6 +57,7 @@ public class OnlinePreviewController {
return otherFilePreview.notSupportedFile(model, errorMsg);
}
FileAttribute fileAttribute = fileHandlerService.getFileAttribute(fileUrl, req);
model.addAttribute("file", fileAttribute);
FilePreview filePreview = previewFactory.get(fileAttribute);
logger.info("预览文件url{}previewType{}", fileUrl, fileAttribute.getType());
return filePreview.filePreviewHandle(fileUrl, model, fileAttribute);