From 1d39360c60ec4d43ebe4d896baecc8fdd42c08fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E7=B2=BE=E5=8D=8E?= <842761733@qq.com> Date: Thu, 16 Jan 2025 10:44:41 +0800 Subject: [PATCH] =?UTF-8?q?4.4.0=E7=89=88=E6=9C=AC=E5=8F=91=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 4 +- docker/kkfileview-base/Dockerfile | 3 - pom.xml | 2 +- server/pom.xml | 2 +- server/src/main/bin/install.sh | 4 +- server/src/main/bin/startup.bat | 2 +- server/src/main/bin/startup.sh | 6 +- server/src/main/config/application.properties | 2 +- .../cn/keking/utils/LocalOfficeUtils.java | 3 + server/src/main/resources/banner.txt | 2 +- server/src/main/resources/web/main/record.ftl | 58 ++++++++++++++++--- 11 files changed, 64 insertions(+), 24 deletions(-) diff --git a/Dockerfile b/Dockerfile index ca8a97198..3ed0bcf2a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ FROM keking/kkfileview-base:4.4.0 ADD server/target/kkFileView-*.tar.gz /opt/ -ENV KKFILEVIEW_BIN_FOLDER=/opt/kkFileView-4.4.0-beta/bin -ENTRYPOINT ["java","-Dfile.encoding=UTF-8","-Dspring.config.location=/opt/kkFileView-4.4.0-beta/config/application.properties","-jar","/opt/kkFileView-4.4.0-beta/bin/kkFileView-4.4.0-beta.jar"] +ENV KKFILEVIEW_BIN_FOLDER=/opt/kkFileView-4.4.0/bin +ENTRYPOINT ["java","-Dfile.encoding=UTF-8","-Dspring.config.location=/opt/kkFileView-4.4.0/config/application.properties","-jar","/opt/kkFileView-4.4.0/bin/kkFileView-4.4.0.jar"] diff --git a/docker/kkfileview-base/Dockerfile b/docker/kkfileview-base/Dockerfile index 6aeca8c7a..8ebdbbece 100644 --- a/docker/kkfileview-base/Dockerfile +++ b/docker/kkfileview-base/Dockerfile @@ -10,11 +10,8 @@ RUN sed -i 's@//.*archive.ubuntu.com@//mirrors.aliyun.com@g' /etc/apt/sources.li ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime &&\ localedef -i zh_CN -c -f UTF-8 -A /usr/share/locale/locale.alias zh_CN.UTF-8 &&\ locale-gen zh_CN.UTF-8 &&\ -# 安装微软字体 apt-get install -y --no-install-recommends ttf-mscorefonts-installer &&\ -# 安装文泉驿字体 apt-get install -y --no-install-recommends ttf-wqy-microhei ttf-wqy-zenhei xfonts-wqy &&\ -# 清理临时文件 apt-get autoremove -y &&\ apt-get clean &&\ rm -rf /var/lib/apt/lists/* diff --git a/pom.xml b/pom.xml index 26e874edc..90bf39ece 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ cn.keking kkFileView-parent - 4.4.0-beta + 4.4.0 1.8 diff --git a/server/pom.xml b/server/pom.xml index 64746215d..92a6a8b75 100644 --- a/server/pom.xml +++ b/server/pom.xml @@ -6,7 +6,7 @@ kkFileView-parent cn.keking - 4.4.0-beta + 4.4.0 kkFileView diff --git a/server/src/main/bin/install.sh b/server/src/main/bin/install.sh index 96dd5d4d3..6f27e0e19 100644 --- a/server/src/main/bin/install.sh +++ b/server/src/main/bin/install.sh @@ -8,7 +8,7 @@ install_redhat() { yum install -y libSM.x86_64 libXrender.x86_64 libXext.x86_64 yum groupinstall -y "X Window System" yum localinstall -y *.rpm - echo 'install finshed...' + echo 'install finished...' else echo 'download package error...' fi @@ -20,7 +20,7 @@ install_ubuntu() { if [ $? -eq 0 ];then apt-get install -y libxinerama1 libcairo2 libcups2 libx11-xcb1 dpkg -i *.deb - echo 'install finshed...' + echo 'install finished...' else echo 'download package error...' fi diff --git a/server/src/main/bin/startup.bat b/server/src/main/bin/startup.bat index 13a1452d9..2c56460f0 100644 --- a/server/src/main/bin/startup.bat +++ b/server/src/main/bin/startup.bat @@ -7,4 +7,4 @@ echo Please check log file in ../log/kkFileView.log for more information echo You can get help in our official home site: https://kkview.cn echo If you need further help, please join our kk opensource community: https://t.zsxq.com/09ZHSXbsQ echo If this project is helpful to you, please star it on https://gitee.com/kekingcn/file-online-preview/stargazers -java -Dspring.config.location=..\config\application.properties -jar kkFileView-4.4.0-beta.jar -> ..\log\kkFileView.log +java -Dspring.config.location=..\config\application.properties -jar kkFileView-4.4.0.jar -> ..\log\kkFileView.log diff --git a/server/src/main/bin/startup.sh b/server/src/main/bin/startup.sh index 1a7f129d8..fb1a3d8b0 100644 --- a/server/src/main/bin/startup.sh +++ b/server/src/main/bin/startup.sh @@ -9,7 +9,7 @@ # Description: v1.1:修改进程启动机制为pid形式。 ############################# # -DIR_HOME=("/opt/openoffice.org3" "/opt/libreoffice" "/opt/libreoffice6.1" "/opt/libreoffice7.0" "/opt/libreoffice7.1" "/opt/libreoffice7.2" "/opt/libreoffice7.3" "/opt/libreoffice7.4" "/opt/libreoffice7.5" "/opt/libreoffice7.6" "/opt/openoffice4" "/usr/lib/openoffice" "/usr/lib/libreoffice") +DIR_HOME=("/opt/openoffice.org3" "/opt/libreoffice" "/opt/libreoffice6.1" "/opt/libreoffice7.0" "/opt/libreoffice7.1" "/opt/libreoffice7.2" "/opt/libreoffice7.3" "/opt/libreoffice7.4" "/opt/libreoffice7.5" "/opt/libreoffice7.6" "/opt/libreoffice24.2" "/opt/libreoffice24.8" "/opt/libreoffice25.2" "/opt/openoffice4" "/usr/lib/openoffice" "/usr/lib/libreoffice") FLAG= OFFICE_HOME= KKFILEVIEW_BIN_FOLDER=$(cd "$(dirname "$0")" || exit 1 ;pwd) @@ -29,7 +29,7 @@ if [ -s "${PID_FILE}" ]; then else cd "$KKFILEVIEW_BIN_FOLDER" || exit 1 echo "Using KKFILEVIEW_BIN_FOLDER $KKFILEVIEW_BIN_FOLDER" - grep 'office\.home' ../config/application.properties | grep '!^#' + grep 'office\.home' ../config/application.properties | grep -v '^#' | grep -v 'default' if [ $? -eq 0 ]; then echo "Using customized office.home" else @@ -51,7 +51,7 @@ else ## 启动kkFileView echo "Starting kkFileView..." - nohup java -Dfile.encoding=UTF-8 -Dspring.config.location=../config/application.properties -jar kkFileView-4.4.0-beta.jar > ../log/kkFileView.log 2>&1 & + nohup java -Dfile.encoding=UTF-8 -Dspring.config.location=../config/application.properties -jar kkFileView-4.4.0.jar > ../log/kkFileView.log 2>&1 & echo "Please execute ./showlog.sh to check log for more information" echo "You can get help in our official home site: https://kkview.cn" echo "If you need further help, please join our kk opensource community: https://t.zsxq.com/09ZHSXbsQ" diff --git a/server/src/main/config/application.properties b/server/src/main/config/application.properties index c8801b462..251f5d691 100644 --- a/server/src/main/config/application.properties +++ b/server/src/main/config/application.properties @@ -3,7 +3,7 @@ server.port = ${KK_SERVER_PORT:8012} server.servlet.context-path= ${KK_CONTEXT_PATH:/} server.servlet.encoding.charset = utf-8 #启用GZIP压缩功能 -server.compression.enable= true +server.compression.enabled = true #允许压缩的响应缓冲区最小字节数,默认2048 server.compression.min-response-size = 2048 #压缩格式 diff --git a/server/src/main/java/cn/keking/utils/LocalOfficeUtils.java b/server/src/main/java/cn/keking/utils/LocalOfficeUtils.java index e1a23da03..17bc1d467 100644 --- a/server/src/main/java/cn/keking/utils/LocalOfficeUtils.java +++ b/server/src/main/java/cn/keking/utils/LocalOfficeUtils.java @@ -86,6 +86,9 @@ public static File getDefaultOfficeHome() { "/opt/libreoffice7.4", "/opt/libreoffice7.5", "/opt/libreoffice7.6", + "/opt/libreoffice24.2", + "/opt/libreoffice24.8", + "/opt/libreoffice25.2", "/usr/lib64/libreoffice", "/usr/lib/libreoffice", "/usr/local/lib64/libreoffice", diff --git a/server/src/main/resources/banner.txt b/server/src/main/resources/banner.txt index 043fb516c..f394ae3e2 100644 --- a/server/src/main/resources/banner.txt +++ b/server/src/main/resources/banner.txt @@ -7,7 +7,7 @@ |_|\_\ |_|\_\ |_| |_| |_| \___| \/ |_| \___| \_/\_/ => Spring Boot :: ${spring-boot.version} - => kkFileView :: 4.4.0-beta + => kkFileView :: 4.4.0 => Home site :: https://kkview.cn => Github :: https://github.com/kekingcn/kkFileView => Gitee :: https://gitee.com/kekingcn/file-online-preview diff --git a/server/src/main/resources/web/main/record.ftl b/server/src/main/resources/web/main/record.ftl index cf1d596b3..3fdde4872 100644 --- a/server/src/main/resources/web/main/record.ftl +++ b/server/src/main/resources/web/main/record.ftl @@ -35,16 +35,56 @@
-

2025年01月11日,v4.4.0版本

+

2025年01月16日,v4.4.0版本

- 1. 修复压缩包穿越漏洞
- 2. 新增PDF线程管理,超时管理,内存缓存管理,更新PDF解析组件版本
- 3. 修复压缩获取路径错误,图片合集路径错误,水印问题等BUG
- 4. 修复前端解析xlsx 包含emf格式文件错误
- 5. 优化Dockerfile,支持真正的跨平台构建镜像
- 6. 其他功能优化及已知问题修复
+

优化

+ 1. 优化 OFD 移动端预览 页面不自适应
+ 2. 更新 xlsx 前端解析组件,加速解析速度
+ 3. 升级 CAD 组件
+ 4. office 功能调整,支持批注、转换页码限制、生成水印等功能
+ 5. 升级 markdown 组件
+ 6. 升级 dcm 解析组件
+ 7. 升级 PDF.JS 解析组件
+ 8. 更换视频播放插件为 ckplayer
+ 9. tif 解析更加智能化,支持被修改的图片格式
+ 10. 针对大小文本文件检测字符编码的正确率,处理并发隐患
+ 11. 重构下载文件的代码,新增通用的文件服务器认证访问的设计
+ 12. 更新 bootstrap 组件,并精简掉不需要的文件
+ 13. 更新 epub 版本,优化 epub 显示效果
+ 14. 解决定时清除缓存时,对于多媒体类型文件,只删除了磁盘缓存文件
+ 15. 自动检测已安装 Office 组件,增加 LibreOffice 7.5 & 7.6 版本默认路径
+ 16. 修改 drawio 默认为预览模式
+ 17. 新增 PDF 线程管理、超时管理、内存缓存管理,更新 PDF 解析组件版本
+ 18. 优化 Dockerfile,支持真正的跨平台构建镜像
+
+

新增

+ 1. xlsx 新增支持打印功能
+ 2. 配置文件新增启用 GZIP 压缩
+ 3. CAD 格式新增支持转换成 SVG 和 TIF 格式,新增超时结束、线程管理
+ 4. 新增删除文件使用验证码校验
+ 5. 新增 xbrl 格式预览支持
+ 6. PDF 预览新增控制签名、绘图、插图控制、搜索定位页码、定义显示内容等功能
+ 7. 新增 CSV 格式前端解析支持
+ 8. 新增 ARM64 下的 Docker 镜像支持
+ 9. 新增 Office 预览支持转换超时属性设置功能
+ 10. 新增预览文件 host 黑名单机制
+
+

修复

+ 1. 修复 forceUpdatedCache 属性设置,但本地缓存文件不更新的问题
+ 2. 修复 PDF 解密加密文件转换成功后后台报错的问题
+ 3. 修复 BPMN 不支持跨域的问题
+ 4. 修复压缩包二级反代特殊符号错误问题
+ 5. 修复视频跨域配置导致视频无法预览的问题
+ 6. 修复 TXT 文本类分页二次加载问题
+ 7. 修复 Drawio 缺少 Base64 组件的问题
+ 8. 修复 Markdown 被转义问题
+ 9. 修复 EPUB 跨域报错问题
+ 10. 修复 URL 特殊符号问题
+ 11. 修复压缩包穿越漏洞
+ 12. 修复压缩获取路径错误、图片合集路径错误、水印问题等 BUG
+ 13. 修复前端解析 XLSX 包含 EMF 格式文件错误问题
@@ -61,8 +101,8 @@ 3. 修复 forceUpdatedCache 属性设置,但是本地缓存文件不更新缺陷
4. 配置文件新增启用 GZIP压缩
5. 升级CAD组件,CAD格式新增支持 转换成svg tif 格式 新增 超时结束 新增线程管理
- 6. 删除功能 新增验证码方法
- 7. office 功能调整 支持批注 转换页码限制 生成水印等等
+ 6. 删除功能 新增验证码方法
+ 7. office 功能调整 支持批注 转换页码限制 生成水印等等
8. 新增xbrl格式
9. 修复PDF解密加密文件 转换成功后台报错问题
10. 升级markdown组件 修复markdown被转义问题