diff --git a/Dockerfile b/Dockerfile index 3ed0bcf2..dff9781e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM keking/kkfileview-base:4.4.0 +FROM keking/kkfileview-base:5.0.0 ADD server/target/kkFileView-*.tar.gz /opt/ -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"] +ENV KKFILEVIEW_BIN_FOLDER=/opt/kkFileView-5.0.0/bin +ENTRYPOINT ["java","-Dfile.encoding=UTF-8","-Dspring.config.location=/opt/kkFileView-5.0.0/config/application.properties","-jar","/opt/kkFileView-5.0.0/bin/kkFileView-5.0.0.jar"] diff --git a/README.cn.md b/README.cn.md index 1d66a58f..32ceaa08 100644 --- a/README.cn.md +++ b/README.cn.md @@ -149,7 +149,7 @@ pdf预览模式预览效果如下 ### 历史更新记录 -#### > 2026年01月20日,v5.0 版本发布 : +#### > 2026年04月14日,v5.0.0 版本发布 : #### 优化内容 1. xlsx 前端解析优化 - 提升Excel文件前端渲染性能 2. 图片解析优化 - 改进图片处理机制 @@ -159,6 +159,10 @@ pdf预览模式预览效果如下 6. ftp多客户端接入优化 - 提升FTP服务兼容性 7. 首页目录访问优化 - 采用post服务端分页机制 8. marked 解析优化 - 改进Markdown渲染 +9. 压缩包预览页重构为单工作区布局,支持目录折叠与右侧内嵌预览 +10. 优化压缩包内文件类型标识,以及单图预览页的展示样式 +11. 补充面向工程自动化与编码代理的仓库说明文档 +12. 重构演示门户页面,包括首页、接入说明、版本记录与赞助页 #### 新增功能 1. msg邮件解析 - 新增msg格式邮件文件预览支持 @@ -179,6 +183,12 @@ pdf预览模式预览效果如下 2. 安全问题 - 修复安全漏洞 3. 图片水印不全问题 - 修复水印显示不完整 4. SSL自签证书接入问题 - 修复自签名证书兼容性 +5. 修复压缩包内 Office 文件在重复解压后被追加写坏,导致一直卡在加载中的问题 +6. Office 默认预览改为 PDF 模式,且 PDF 预览默认打开缩略图侧栏 +7. 启动脚本改为自动发现当前发布包中的 jar,移除过时的硬编码 jar 名称 +8. 更新 Docker 与发布辅助文档,使其与 5.0.0 发布线保持一致 +9. 修复 OFD 表格竖线溢出导致的渲染异常 +10. 修复 PDF.js 兼容性补丁,避免兼容环境下的预览报错 #### 更新内容 1. JDK版本要求 - 强制要求JDK 21及以上版本 @@ -189,6 +199,8 @@ pdf预览模式预览效果如下 6. tif后端异步转换优化 - 实现多线程异步转换 7. 视频后端异步转换优化 - 实现多线程异步转换 8. CAD后端异步转换优化 - 实现多线程异步转换 +9. 默认预览配置策略调整 - Office 预览默认切换为 PDF 模式,默认隐藏图片/PDF 模式切换按钮,且 PDF 预览默认展开缩略图侧栏。若升级后仍需保持旧的图片优先体验,请显式设置 `office.preview.type=image` 和 `office.preview.switch.disabled=false`。 +10. 信任域名配置匹配策略扩展 - `trust.host` 及相关规则现已支持通配符和 CIDR 匹配,升级后如果你依赖域名/IP 模式匹配,需要重新检查白名单和黑名单的实际生效范围 #### > 2025年01月16日,v4.4.0 版本发布 : @@ -468,4 +480,3 @@ dcm医疗数位影像 引用于 [dcmjs](https://github.com/dcmjs-org/dcmjs )开 - 本项目诞生于[凯京集团],在取得公司高层同意后以 Apache 协议开源出来反哺社区,在此特别感谢凯京集团,以及集团领导[@唐老大](https://github.com/tangshd)的支持、@端木详笑的贡献。 - 本项目已脱离公司由[KK开源社区]维护发展壮大,感谢所有给 kkFileView 提 Issue 、Pr 开发者 - 本项目引入的第三方组件已在 '关于引用' 列表列出,感谢这些项目,让 kkFileView 更出色 - diff --git a/README.md b/README.md index 740fdd9f..474cb41c 100644 --- a/README.md +++ b/README.md @@ -65,9 +65,9 @@ URL:[https://file.kkview.cn](https://file.kkview.cn) ## Change History -### Version 5.0 (January 20, 2026) +### Version 5.0.0 (April 14, 2026) -#### Optimizations +#### Improvements 1. Enhanced xlsx front-end parsing - Improved Excel file front-end rendering performance 2. Optimized image parsing - Enhanced image processing mechanism 3. Improved tif parsing - Enhanced TIF format support @@ -76,6 +76,10 @@ URL:[https://file.kkview.cn](https://file.kkview.cn) 6. Optimized ftp multi-client access - Improved FTP service compatibility 7. Enhanced home page directory access - Implemented post server-side pagination mechanism 8. Improved marked parsing - Enhanced Markdown rendering +9. Redesigned archive preview into a single workspace with a collapsible tree and inline file preview +10. Improved archive preview file-type badges and single-image preview styling +11. Added an agent-focused repository guide for engineering automation and maintenance +12. Refreshed the demo portal pages, including the index, integration guide, release record, and sponsor pages #### New Features 1. msg email parsing - Added support for msg format email file preview @@ -96,6 +100,12 @@ URL:[https://file.kkview.cn](https://file.kkview.cn) 2. Security issues - Fixed security vulnerabilities 3. Incomplete image watermark issues - Fixed incomplete watermark display 4. SSL self-signed certificate access issues - Fixed compatibility with self-signed certificates +5. Fixed archive-contained Office files that could stay stuck on loading because repeated extraction appended to existing files +6. Default Office preview now prefers PDF mode, and PDF preview opens with the thumbnail sidebar visible by default +7. Updated startup scripts to discover the packaged jar dynamically instead of relying on stale hard-coded jar names +8. Updated Docker and release helper docs to align with the 5.0.0 release line +9. Fixed OFD table border overflow rendering issues +10. Refined the PDF.js compatibility polyfill to avoid preview errors in compatibility environments #### Updates 1. JDK version requirement - Mandatory requirement for JDK 21 or higher @@ -106,6 +116,8 @@ URL:[https://file.kkview.cn](https://file.kkview.cn) 6. tif backend async conversion optimization - Implemented multi-threaded asynchronous conversion 7. Video backend async conversion optimization - Implemented multi-threaded asynchronous conversion 8. CAD backend async conversion optimization - Implemented multi-threaded asynchronous conversion +9. Default preview configuration strategy adjusted - Office preview now defaults to PDF mode, the mode switch is hidden by default, and PDF preview opens with the thumbnail sidebar visible. If you need the previous image-first behavior after upgrade, explicitly set `office.preview.type=image` and `office.preview.switch.disabled=false`. +10. Trust host configuration matching expanded - `trust.host` and related rules now support wildcard and CIDR matching, which may broaden or narrow effective allow/deny behavior after upgrade depending on your patterns ### Version 4.4.0 (January 16, 2025) diff --git a/doc/ci-auto-deploy.md b/doc/ci-auto-deploy.md index fc7ccdc5..028260e5 100644 --- a/doc/ci-auto-deploy.md +++ b/doc/ci-auto-deploy.md @@ -3,7 +3,7 @@ 当前线上 Windows 服务器的实际部署信息如下: - 部署根目录:`C:\kkFileView-5.0` -- 运行 jar:`C:\kkFileView-5.0\bin\kkFileView-5.0.jar` +- 运行 jar:`C:\kkFileView-5.0\bin\kkFileView-<当前项目版本>.jar` - 启动脚本:`C:\kkFileView-5.0\bin\startup.bat` - 运行配置:`C:\kkFileView-5.0\config\test.properties` - 健康检查地址:`http://127.0.0.1:8012/` diff --git a/docker/kkfileview-base/README.cn.md b/docker/kkfileview-base/README.cn.md index 42706e12..a129ea5a 100644 --- a/docker/kkfileview-base/README.cn.md +++ b/docker/kkfileview-base/README.cn.md @@ -7,10 +7,10 @@ 然后使用 kkfileview-base 作为基础镜像进行构建,加快 kkfileview docker 镜像构建与发布。 执行如下命令即可构建基础镜像: -> 这里镜像 tag 以 4.4.0 为例,本项目所维护的 Dockerfile 文件考虑了跨平台兼容性。 如果你需要用到 arm64 架构镜像, 则在arm64 架构机器上同样执行下面的构建命令即可 +> 这里镜像 tag 以 5.0.0 为例,本项目所维护的 Dockerfile 文件考虑了跨平台兼容性。 如果你需要用到 arm64 架构镜像, 则在arm64 架构机器上同样执行下面的构建命令即可 ```shell -docker build --tag keking/kkfileview-base:4.4.0 . +docker build --tag keking/kkfileview-base:5.0.0 . ``` @@ -46,5 +46,5 @@ docker build --tag keking/kkfileview-base:4.4.0 . 现在就可以愉快地开始构建了,构建命令示例: ```shell -docker buildx build --platform=linux/amd64,linux/arm64 -t keking/kkfileview-base:4.4.0 --push . +docker buildx build --platform=linux/amd64,linux/arm64 -t keking/kkfileview-base:5.0.0 --push . ``` diff --git a/docker/kkfileview-base/README.md b/docker/kkfileview-base/README.md index 95f840f6..e1fa6850 100644 --- a/docker/kkfileview-base/README.md +++ b/docker/kkfileview-base/README.md @@ -8,10 +8,10 @@ Then, use kkfileview-base as the base image to build and speed up the kkfileview To build the base image, run the following command: -> In this example, the image tag is 4.4.0. The Dockerfile maintained in this project considers cross-platform compatibility. If you need an arm64 architecture image, run the same build command on an arm64 architecture machine. +> In this example, the image tag is 5.0.0. The Dockerfile maintained in this project considers cross-platform compatibility. If you need an arm64 architecture image, run the same build command on an arm64 architecture machine. ```shell -docker build --tag keking/kkfileview-base:4.4.0 . +docker build --tag keking/kkfileview-base:5.0.0 . ``` @@ -49,5 +49,5 @@ Assuming the current machine is amd64 (x86_64) architecture, you'll need to enab Now you can enjoy the building. Here’s an example build command: ```shell -docker buildx build --platform=linux/amd64,linux/arm64 -t keking/kkfileview-base:4.4.0 --push . +docker buildx build --platform=linux/amd64,linux/arm64 -t keking/kkfileview-base:5.0.0 --push . ``` diff --git a/pom.xml b/pom.xml index ae0b4894..61e104db 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ cn.keking kkFileView-parent - 5.0 + 5.0.0 @@ -110,4 +110,4 @@ github https://github.com/kekingcn/kkFileView/issues - \ No newline at end of file + diff --git a/server/pom.xml b/server/pom.xml index b815f309..bf620c30 100644 --- a/server/pom.xml +++ b/server/pom.xml @@ -6,7 +6,7 @@ kkFileView-parent cn.keking - 5.0 + 5.0.0 kkFileView diff --git a/server/src/main/bin/startup.bat b/server/src/main/bin/startup.bat index 2c56460f..4f4ff07a 100644 --- a/server/src/main/bin/startup.bat +++ b/server/src/main/bin/startup.bat @@ -1,10 +1,20 @@ @echo off set "KKFILEVIEW_BIN_FOLDER=%cd%" cd "%KKFILEVIEW_BIN_FOLDER%" +set "JAR_NAME=" +for %%F in (kkFileView-*.jar) do ( + set "JAR_NAME=%%~nxF" + goto :jar_found +) +echo Error: kkFileView jar not found in %KKFILEVIEW_BIN_FOLDER% +exit /b 1 + +:jar_found echo Using KKFILEVIEW_BIN_FOLDER %KKFILEVIEW_BIN_FOLDER% +echo Using JAR_NAME %JAR_NAME% echo Starting kkFileView... 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.jar -> ..\log\kkFileView.log +java -Dspring.config.location=..\config\application.properties -jar "%JAR_NAME%" > ..\log\kkFileView.log 2>&1 diff --git a/server/src/main/bin/startup.sh b/server/src/main/bin/startup.sh index fb1a3d8b..da3a4aa6 100644 --- a/server/src/main/bin/startup.sh +++ b/server/src/main/bin/startup.sh @@ -49,9 +49,16 @@ else fi fi + JAR_PATH=$(ls kkFileView-*.jar 2>/dev/null | head -n 1) + if [ -z "${JAR_PATH}" ]; then + echo "kkFileView jar not found in ${KKFILEVIEW_BIN_FOLDER}" + exit 1 + fi + ## 启动kkFileView echo "Starting kkFileView..." - nohup java -Dfile.encoding=UTF-8 -Dspring.config.location=../config/application.properties -jar kkFileView-4.4.0.jar > ../log/kkFileView.log 2>&1 & + echo "Using jar ${JAR_PATH}" + nohup java -Dfile.encoding=UTF-8 -Dspring.config.location=../config/application.properties -jar "${JAR_PATH}" > ../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 0423d607..40578894 100644 --- a/server/src/main/config/application.properties +++ b/server/src/main/config/application.properties @@ -96,11 +96,11 @@ office.documentopenpasswords = ${KK_OFFICE_DOCUMENTOPENPASSWORD:true} office.type.web = ${KK_OFFICE_TYPE_WEB:web} # Office文档预览类型 -# 支持动态配置,可选值:image/pdf +# 支持动态配置,可选值:image/pdf,默认使用pdf模式 office.preview.type = ${KK_OFFICE_PREVIEW_TYPE:pdf} -# 是否关闭Office预览模式切换开关,默认为false(允许切换) -# 设置为true时,用户无法在图片和PDF模式间切换 +# 是否关闭Office预览模式切换开关,默认为true(关闭切换) +# 设置为false时,用户可以在图片和PDF模式间切换 office.preview.switch.disabled = ${KK_OFFICE_PREVIEW_SWITCH_DISABLED:true} diff --git a/server/src/main/resources/web/main/record.ftl b/server/src/main/resources/web/main/record.ftl index 8dc9b2e2..115ce7fa 100644 --- a/server/src/main/resources/web/main/record.ftl +++ b/server/src/main/resources/web/main/record.ftl @@ -41,10 +41,10 @@ 你可以先看最新版本的升级重点,再顺着时间轴继续了解历史版本细节。

- 最新版本 v5.0 - 发布日期 2026-01-20 + 最新版本 v5.0.0 + 发布日期 2026-04-14 JDK 21+ 强制要求 - PDF / TIF / CAD 异步化 + 压缩包工作区预览 / PDF 默认模式
@@ -53,9 +53,9 @@
2026
-

v5.0

+

v5.0.0

- 2026-01-20 + 2026-04-14 最新稳定版本 升级需 JDK 21+
@@ -66,6 +66,9 @@
  • 优化 xlsx、图片、tif、svg、json 解析效果。
  • 优化 FTP 多客户端接入与 marked 解析。
  • 首页支持目录访问,并切换为 POST 服务端分页。
  • +
  • 压缩包预览页重构为单工作区布局,支持目录折叠与右侧内嵌预览。
  • +
  • 优化压缩包内文件类型标识,以及单图预览页展示样式。
  • +
  • 重构演示门户页面,包括首页、接入说明、版本记录与赞助页。
  • @@ -74,6 +77,7 @@
  • 新增 msg、heic/heif、页码、高亮、AES、Basic Auth、秘钥等能力。
  • 新增防重复转换、异步等待、上传限制与 cadviewer 转换方法。
  • 新增 pptm 支持。
  • +
  • 补充面向工程自动化与编码代理的仓库说明文档。
  • @@ -82,6 +86,9 @@
  • 修复压缩包路径问题与安全问题。
  • 修复图片水印不完整。
  • 修复 SSL 自签证书接入问题。
  • +
  • 修复压缩包内 Office 文件重复解压后被追加写坏、导致一直加载中的问题。
  • +
  • Office 默认预览切到 PDF 模式,并默认展开 PDF 缩略图侧栏。
  • +
  • 修复 OFD 表格竖线溢出导致的渲染异常,并修正 PDF.js 兼容性补丁。
  • @@ -90,6 +97,9 @@
  • JDK 版本要求升级到 21 及以上。
  • 前端解析链路升级:PDF、ODF、3D 模型。
  • 后端异步转换升级:PDF、TIF、视频、CAD。
  • +
  • 启动脚本改为自动发现当前发布包中的 jar,并同步更新 Docker 与发布辅助文档。
  • +
  • 默认配置策略调整:Office 预览默认使用 PDF 模式,默认隐藏图片/PDF 模式切换按钮;如需保留旧的图片优先体验,请显式设置 office.preview.type=imageoffice.preview.switch.disabled=false
  • +
  • 信任域名配置匹配策略扩展:trust.host 及相关规则支持通配符与 CIDR 匹配;升级后请重新核对白名单和黑名单的匹配范围。