1,优化URL报错,2,更新OFD组件 3,美化Excel 4,文本方法关闭字节流 5,新增多种类型文件预览 (#419)

1,优化URL报错
2,更新OFD组件
3,美化Excel
4,文本方法关闭字节流
5,新增xmind、eml、epub、"obj", "3ds", "stl", "ply", "off", "3dm", "fbx", "dae", "wrl", "3mf", "ifc","glb","o3dv","gltf","stp","bim","fcstd","step","iges","brep"格式

Co-authored-by: gaoxiongzaq <admin@cxcp.com>
This commit is contained in:
gaoxingzaq
2022-12-28 10:17:06 +08:00
committed by GitHub
parent aa66173625
commit 69566834ea
96 changed files with 320274 additions and 708 deletions

View File

@ -151,7 +151,7 @@ public class FileHandlerService {
// 添加sheet控制头
sb.append("<script src=\"js/jquery-3.6.1.min.js\" type=\"text/javascript\"></script>");
sb.append("<script src=\"js/excel.header.js\" type=\"text/javascript\"></script>");
sb.append("<link rel=\"stylesheet\" href=\"bootstrap/css/bootstrap.min.css\">");
sb.append("<link rel=\"stylesheet\" href=\"bootstrap/css/xlsx.css\">");
} catch (IOException e) {
e.printStackTrace();
}
@ -273,10 +273,16 @@ public class FileHandlerService {
if (url.contains("?fileKey=")) {
attribute.setSkipDownLoad(true);
}
String urlStrr = url.toLowerCase(); //转换为小写对比
boolean wjl = WebUtils.kuayu("&fullfilename=", urlStrr); //判断是否启用文件流
if(wjl){
url = url.substring(0,url.lastIndexOf("&")); //删除添加的文件流内容
}
url = WebUtils.encodeUrlFileName(url);
fileName = KkFileUtils.htmlEscape(fileName); //文件名处理
attribute.setType(type);
attribute.setName(fileName);
attribute.setSuffix(suffix);
url = WebUtils.encodeUrlFileName(url);
attribute.setUrl(url);
if (req != null) {
String officePreviewType = req.getParameter("officePreviewType");