Compare commits

...

302 Commits

Author SHA1 Message Date
kl
a8a08c1dcc Address PR review feedback 2026-04-13 21:02:59 +08:00
kl
7757729efd Refine archive preview and PDF defaults 2026-04-13 20:54:27 +08:00
kl
b246bfdac7 Merge pull request #737 from kekingcn/codex/fix-index-form-layout
fix: correct index preview form layout
2026-04-11 21:36:37 +08:00
chenkailing
d35393ba22 fix: tighten index form layout 2026-04-11 21:30:25 +08:00
chenkailing
c893dd7095 fix: keep preview parameters on one row 2026-04-11 21:12:06 +08:00
kl
9bdb18d833 Merge pull request #736 from kekingcn/codex/ci-auto-deploy-server-build
feat: add server-build auto deploy
2026-04-11 20:30:13 +08:00
chenkailing
58fc1af74f fix: address deploy review comments 2026-04-11 20:22:15 +08:00
chenkailing
1b3cf33bf0 feat: add server-build auto deploy 2026-04-11 19:36:19 +08:00
kl
c9005d0c04 Merge pull request #735 from kekingcn/codex/ci-auto-deploy-fix
fix: harden master auto deploy artifact delivery
2026-04-11 17:16:26 +08:00
chenkailing
37bda20d08 fix: harden master auto deploy artifact delivery 2026-04-11 17:08:31 +08:00
kl
1819861647 Merge pull request #734 from kekingcn/codex/ci-auto-deploy
[codex] add master auto deploy workflow
2026-04-11 16:27:37 +08:00
chenkailing
352b86b40d fix: address deploy review feedback 2026-04-11 16:14:01 +08:00
chenkailing
853ad0154f chore: drop generated pycache 2026-04-11 15:54:43 +08:00
chenkailing
c88bf04a0d feat: add master auto deploy workflow 2026-04-11 15:54:11 +08:00
kl
6a84e61ecb Merge pull request #733 from kekingcn/codex/redesign-demo-page-v1-polish
[codex] polish demo portal pages
2026-04-11 15:29:47 +08:00
chenkailing
dd6e369e6a feat: polish demo portal pages 2026-04-11 15:19:26 +08:00
chenkailing
bd20546b6d feat: redesign demo pages v1 2026-04-11 00:29:49 +08:00
kl
c41c14bf3c Merge pull request #729 from kekingcn/copilot/fix-pdf-preview-error
Restore mobile PDF preview compatibility for browsers without `Array.prototype.at`
2026-04-09 12:04:13 +08:00
copilot-swe-agent[bot]
3fbf0156e2 fix: refine pdfjs at compatibility polyfill
Agent-Logs-Url: https://github.com/kekingcn/kkFileView/sessions/287f0212-d368-4b59-ae70-0374fb3fe76f

Co-authored-by: klboke <18591662+klboke@users.noreply.github.com>
2026-04-09 02:50:17 +00:00
copilot-swe-agent[bot]
530304b832 test: use junit assertions for pdf viewer compatibility
Agent-Logs-Url: https://github.com/kekingcn/kkFileView/sessions/287f0212-d368-4b59-ae70-0374fb3fe76f

Co-authored-by: klboke <18591662+klboke@users.noreply.github.com>
2026-04-09 02:48:24 +00:00
copilot-swe-agent[bot]
5499150395 fix: add pdfjs at compatibility polyfill
Agent-Logs-Url: https://github.com/kekingcn/kkFileView/sessions/287f0212-d368-4b59-ae70-0374fb3fe76f

Co-authored-by: klboke <18591662+klboke@users.noreply.github.com>
2026-04-09 02:46:24 +00:00
kl
2dcc62f3da fix(actions): use @Copilot mention in issue auto comment 2026-04-09 10:45:31 +08:00
copilot-swe-agent[bot]
405a12ef07 Initial plan 2026-04-09 02:39:52 +00:00
kl
bb0734b3d3 Merge feat/e2e-expand-pr342-coverage into master 2026-04-07 16:32:12 +08:00
kl
a9e394950f test(e2e): expand preview coverage for pdf mp4 cad 2026-04-07 16:31:55 +08:00
kl
be6023701c Merge PR342 into master with trust-host conflict resolution 2026-04-07 15:59:20 +08:00
kl
02bcd35779 verify: 回退到原始 OFD 修复版本进行验证 (#724)
使用原始选择器 #content svg { overflow: hidden !important; }
验证该版本是否存在问题
2026-03-11 21:02:55 +08:00
kl
b6dd8129ea refactor: 优化 OFD 表格溢出修复选择器 - 仅覆盖有 inline style 的 SVG
采纳 Copilot 的建议,改用更精准的选择器 #content svg[style="overflow:visible"]。
这样可以只覆盖有 inline style overflow:visible 的 SVG 容器,避免影响其他
已有 overflow:hidden 的元素。保留完整的注释说明问题根因和解决方案。

Ref: Copilot suggestion on PR #723
2026-03-11 20:37:01 +08:00
kl
db5cd68a1e fix: OFD 表格竖线溢出修复 (#723)
cnofd 库渲染 OFD 表格时,为每个元素创建独立 SVG 容器并设置
inline style overflow:visible。当表格中间竖线的 path 元素
y 坐标超过 SVG 容器高度时,线条会溢出到表格底部边框之外。

修复方案:对 #content 下的 SVG 元素强制 overflow:hidden,
使用 !important 覆盖 inline style,精确裁剪超出部分。

Closes #xxx
2026-03-11 20:04:00 +08:00
kl
d1c310ab63 test(e2e): expand archive format coverage (tar/tgz/7z/rar) (#720)
* test(e2e): expand archive coverage to tar/tgz/7z/rar

* test: address copilot archive fixture review feedback

* test(e2e): add rar smoke coverage and align archive deps

* test(e2e): make tgz fixture gzip header deterministic

* test(e2e): keep legacy zip temp dir ignored

* test(e2e): address remaining copilot review comments

* test(e2e): make 7z fixture generation deterministic and strict

* test(e2e): fail fast when sample.rar fixture is missing
2026-03-09 12:44:48 +08:00
kl
b10e14899d test(e2e): unify E2E CI command and align preview URL encoding (#719)
* test(e2e): follow-up fixes for post-merge copilot review feedback

* test(e2e): guard E2E_MAX_PREVIEW_MS against sub-second values

* test(e2e): align preview URL encoding and docs
2026-03-04 17:39:41 +08:00
kl
eee3a2ed38 test(e2e): follow-up fixes after post-merge copilot findings (#718)
* test(e2e): follow-up fixes for post-merge copilot review feedback

* test(e2e): guard E2E_MAX_PREVIEW_MS against sub-second values
2026-03-04 15:45:04 +08:00
kl
68d4d23a4b test(e2e): phase-3 add nightly full run and perf smoke checks (#717)
* test(e2e): phase-3 add nightly workflow and perf smoke suite

* test(e2e): address copilot review for phase-3 fixture and readiness flow
2026-03-04 15:06:15 +08:00
kl
bb457924cd test(e2e): phase-2 add Office and zip smoke automation (#714)
* test(e2e): phase-2 add office and zip smoke coverage

* test(e2e): address copilot review for fixture stability and CI python setup

* test(e2e): fix preflight fixture scope and path handling

* test(e2e): harden fixture preflight and remove duplicate generation

* test(e2e): remove redundant zip install and cleanup temp zip dir

* test(e2e): ensure zip dependency and unify python command in docs

* docs(e2e): align README with npm gen scripts and python3 usage
2026-03-04 14:34:32 +08:00
kl
a0d78c57e3 test(e2e): add MVP end-to-end automation suite and CI workflow (#713)
* test(e2e): add mvp playwright suite and PR workflow

* ci(e2e): use JDK 21 for kkFileView build
2026-03-04 10:46:41 +08:00
kl
7f16243270 chore(github): add accelerated support notice for urgent issues (#712)
* chore(github): add support acceleration notice to issue templates and auto-comments

* chore(actions): make copilot auto-comment bilingual and single-message
2026-03-03 19:28:23 +08:00
kl
36a75e86ac chore(github): add bilingual feature request issue template (#711)
* chore(github): add bilingual feature request issue template

* chore(github): refine feature template wording and split intake path
2026-03-03 19:10:05 +08:00
kl
7c41200028 chore(actions): auto-close >1y issues and trigger copilot triage comments 2026-03-03 18:57:59 +08:00
kl
3da0c523e8 chore(github): add bilingual required issue template 2026-03-03 18:26:39 +08:00
kl
8c3bc81e08 fix(security): support wildcard/cidr host pattern matching (#710)
* fix(security): support wildcard/cidr host pattern matching

* fix(security): harden host matching against null and DNS rebinding

* fix(security): handle ipv4 unsigned range and deny template fallback

* test(security): verify CIDR matching for IPv4 upper boundary

* fix(security): set UTF-8 deny response and use Locale.ROOT

* fix(security): enforce whitelist with blacklist and harden wildcard rules
2026-03-03 15:26:35 +08:00
高雄
9d72706c2d 5.0版本 发布 美化首页 修复压缩包 秘钥问题 修复分页问题 2026-01-26 10:58:50 +08:00
高雄
0aa8de27d4 5.0版本 发布 新增pptm 新增heif 美化heif 模板 美化tif 美化md 优化http方法 优化首页目录读取方法 2026-01-23 15:50:24 +08:00
高雄
b08f4657e5 5.0版本 发布 重构下载方法 修复pdf 占用demo文件夹 2026-01-22 17:17:37 +08:00
高雄
1e04822532 5.0版本 发布 优化下载方法 修复office 重复转换方法错误 2026-01-22 15:41:54 +08:00
高雄
4e5e9b7cba 5.0版本 发布 新增 cadviewer转换方法 2026-01-22 11:53:14 +08:00
高雄
a2fe4658c4 5.0版本 发布 新增 cadviewer转换方法 2026-01-22 11:35:09 +08:00
高雄
e43f10138f 5.0版本 发布 新增 cadviewer转换方法 2026-01-22 11:28:25 +08:00
高雄
7dc0469b30 新增 页码定位 美化前端 其他功能调整等 2026-01-19 17:46:32 +08:00
高雄
904af89190 优化多线程转换方法 添加异步转换提示 2026-01-15 15:43:37 +08:00
高雄
2425bea9b6 优化多线程转换方法 添加异步转换提示 2026-01-15 15:43:13 +08:00
高雄
b5579ae890 tif 优化多线程转换方法 2026-01-09 17:36:37 +08:00
高雄
595f3f55f2 tif 优化多线程转换方法 2026-01-09 17:36:26 +08:00
高雄
c96b7ebd1e tif 优化多线程转换方法 2026-01-09 17:36:11 +08:00
高雄
9a3ec88390 cad pdf转换模块提取独立 优化多线程转换方法 2026-01-09 15:44:02 +08:00
高雄
ea35da6694 更新 3d解析组件 更新pdfjs解析组件 2026-01-06 16:07:29 +08:00
高雄
00a8e094db 更新 3d解析组件 2025-12-31 16:40:19 +08:00
高雄
58d0b24b16 更新 优化ofd 2025-12-31 16:39:08 +08:00
高雄
b20637652a 优化 视频转换模块 2025-12-29 16:40:00 +08:00
高雄
e1e146cb5f 更新 tif组件 修复因jdk 升级tif 转换失败问题 2025-12-29 15:22:14 +08:00
高雄
e52f374252 更新 libreoffice 25 和26 版本识别 2025-12-29 11:51:34 +08:00
高雄
daab5963bc 更新 redis 方法 支持群集 2025-12-29 10:55:17 +08:00
高雄
38a9c142e2 修复编码转换问题 2025-12-29 10:20:59 +08:00
高雄
4afe1caa33 修复压缩包 路径错误问题 2025-12-29 09:42:21 +08:00
高雄
2dd008532a 更新 pom组件版本 新增安全秘钥接口 新增接口关闭 新增encryption接入方法 新增basic接入方法 新增User-Agent接入方法 支持ftp多用户 支持basic多用户 修复file接入协议错误 修复ssl伪证书错误 美化RUL报错提醒 2025-12-25 17:04:18 +08:00
陈精华
92ca92bee6 支持Java25环境 2025-12-03 18:46:23 +08:00
kailing
64c82a2406 !334 update docker/kkfileview-base/Dockerfile.
Merge pull request !334 from 云上小朱/N/A
2025-11-17 00:53:58 +00:00
云上小朱
e44ef813a1 update docker/kkfileview-base/Dockerfile.
在文件docker/kkfileview-base/Dockerfile中
我看到POM里写的Java21,但是Dockerfile写的JDK8. 是否应改为JDK21,我在本地测试,改为JDK21可正常打包代码并正常运行。

Signed-off-by: 云上小朱 <13077784+ysxz2025@user.noreply.gitee.com>
2025-11-14 01:04:31 +00:00
kl
9f3b45a4c7 安全:强制用户配置可访问域名的白名单或者黑名单,提高安全性 (#692)
* 安全:强制用户配置可访问域名的白名单或者黑名单,提高安全性

* 安全:强制用户配置可访问域名的白名单或者黑名单,提高安全性

* CI:修复 CI 问题

* CI:修复 CI 问题
2025-10-20 14:29:05 +08:00
kl
b1af0c7d72 优化:日志输出重构 (#689) 2025-10-13 11:14:54 +08:00
kl
421640221b Kl (#688)
* 升级: JDK1.8 升级到 JDK21 ,spring-boot 版本从 2.4.2 升级到 3.5.6

* 优化:启动日志新增 java version 输出信息
2025-10-11 20:14:39 +08:00
kl
f6c6e22b0d 升级: JDK1.8 升级到 JDK21 ,spring-boot 版本从 2.4.2 升级到 3.5.6 (#687) 2025-10-11 20:05:43 +08:00
kl
51653483b9 Kl json (#686)
* 新增:JSON 文件格式化预览功能

* 优化:优化 JSON 文件格式化预览效果
2025-10-11 17:54:17 +08:00
kl
a9787b0add 新增:JSON 文件格式化预览功能 (#685) 2025-10-11 11:52:49 +08:00
kl
6cdbf92fb0 优化:完善文件上传禁用功能的用户体验 (#684) 2025-10-11 10:41:34 +08:00
kl
fdb40680d3 安全:禁用文件上传接口 (#656)
- 从配置文件中移除file.upload.disable配置项
- 删除FileController中的文件上传相关代码
- 移除/fileUpload POST接口
- 删除文件上传校验逻辑
- 增强系统安全性,防止恶意文件上传

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Claude <noreply@anthropic.com>
2025-06-30 17:57:45 +08:00
陈精华
6746325bf2 update Github workflow 2025-04-14 16:10:29 +08:00
陈精华
05a8bff1e0 优化:调整单元测试 2025-03-31 15:56:50 +08:00
陈精华
874ff5b3f6 优化:解决部分场景下, 页面元素变化导致水印覆盖不全问题 2025-03-31 15:28:36 +08:00
陈精华
2230cfa52b update README.cn.md 2025-01-22 11:08:28 +08:00
陈精华
83c581364d update README.cn.md 2025-01-22 11:04:40 +08:00
陈精华
1d39360c60 4.4.0版本发布 2025-01-16 10:44:41 +08:00
陈精华
8c763599fe !312 update server/src/main/resources/web/main/record.ftl.
Merge pull request !312 from 高雄/N/A
2025-01-15 03:28:17 +00:00
高雄
9632f6070c update server/src/main/resources/web/main/record.ftl.
更新日志文档

Signed-off-by: 高雄 <admin@cxcp.com>
2025-01-14 01:23:13 +00:00
陈精华
cc63659650 Merge pull request #593 from zp96324511/patch-1
容易引起歧义的环境变量命名
2024-09-30 16:05:29 +08:00
阿鹏
177f389814 容易引起歧义的环境变量命名 2024-09-14 12:09:24 +08:00
陈精华
406e9ea6ee Merge pull request #584 from gitchenjh/master
docker基础镜像调整为kkfileview-base
2024-08-27 10:36:59 +08:00
陈精华
bb461cd74a docker基础镜像调整为kkfileview-base 2024-08-26 10:29:27 +08:00
陈精华
782509376c Merge pull request #581 from wayne-cheng/optimize-dockerfile
优化Dockerfile,支持真正的跨平台构建镜像
2024-08-22 14:41:17 +08:00
郑威
63dc58d088 :construction_worker:优化Dockerfile,支持真正的跨平台构建镜像 2024-08-21 11:12:38 +08:00
陈精华
77f5adb19f !299 修复压缩获取路径错误,图片合集路径错误,水印问题等BUG
Merge pull request !299 from 高雄/yashuoba
2024-07-02 02:20:08 +00:00
陈精华
7abfb67451 !289 修复前端解析xlsx 包含emf格式文件错误
Merge pull request !289 from 高雄/lockkkk
2024-06-25 02:05:43 +00:00
gaoxiongzaq
c8dc638c29 修复压缩获取路径错误,图片合集路径错误,水印问题等BUG 2024-05-27 14:30:31 +08:00
gaoxiongzaq
48ac926289 修复压缩获取路径错误,图片合集路径错误,水印问题等BUG 2024-05-27 14:21:11 +08:00
陈精华
0a4ae41b0c !296 新增PDF线程管理,超时管理,内存缓存管理,更新PDF解析组件版本
Merge pull request !296 from 高雄/pdfddd
2024-05-27 03:32:27 +00:00
gaoxiongzaq
bb0139bee6 新增PDF线程管理,超时管理,内存缓存管理,更新PDF解析组件版本 2024-05-20 10:12:11 +08:00
陈精华
7bf07cb64c !286 修复远程文件,文件名带有穿越的BUG
Merge pull request !286 from 高雄/chuanyue
2024-04-17 02:40:52 +00:00
陈精华
ab370e66a5 Merge pull request #554 from kekingcn/kl
重构解压缩逻辑,fix  #553
2024-04-17 10:32:19 +08:00
kl
421a2760d5 重构解压缩逻辑,fix #553 2024-04-16 20:04:50 +08:00
陈精华
42f0e079f0 4.4.0-beta版本 2024-04-15 09:19:13 +08:00
gaoxiongzaq
9150346926 修复前端解析xlsx 包含emf格式文件错误 2024-03-28 11:26:25 +08:00
gaoxiongzaq
b65a04857c 修复远程文件文件名带有穿越漏洞的BUG 2024-03-27 08:55:28 +08:00
陈精华
59315c3200 maven-assembly插件区分Linux和Windows的assembly-id, 解决maven构建warning 2024-03-26 16:56:11 +08:00
陈精华
08e5a15424 移除@Nullable注解,解决编译warning:未知的枚举常量 javax.annotation.meta.When.MAYBE 2024-03-26 16:47:21 +08:00
陈精华
b8c283f602 !282 升级预览图片组件 修复ecs退出黑屏功能
Merge pull request !282 from 高雄/master
2024-03-26 08:29:41 +00:00
gaoxiongzaq
11f7ee34de 升级预览图片组件 修复ecs退出黑屏功能 2024-03-25 13:49:53 +08:00
陈精华
5be0d60caf !281 修复前端解析csv 某些文件解码错误问题
Merge pull request !281 from 高雄/N/A
2024-03-25 02:27:08 +00:00
高雄
6504ae2f45 !280 优化CAD转换
* 调整输出日志信息
* 统一错误提示规范
* 修复 转义后 流接入方法错误的问题
* 修复 转义后 流接入方法错误的问题
* CAD报错调整
* 优化CAD转换 调整CAD中断进程
2024-03-25 02:26:50 +00:00
高雄
c3155204eb 修复前端解析csv 某些文件解码错误问题
修复前端解析csv 某些文件解码错误问题

Signed-off-by: 高雄 <admin@cxcp.com>
2024-03-21 06:43:58 +00:00
陈精华
ebd35803c6 !279 更新记录文档
Merge pull request !279 from 高雄/N/A
2024-03-20 02:24:59 +00:00
陈精华
55bda80d33 !277 修复 压缩包特殊符文无法访问问题 调整统一url输出为url编码解决特殊符号问题 调整跨域方法和下载方法为一样 支持重定向
Merge pull request !277 from 高雄/master
2024-03-20 02:24:47 +00:00
gaoxiongzaq
3886e62e8e 恢复支持 普通浏览器方法 2024-03-18 13:40:56 +08:00
gaoxiongzaq
07edf77ba8 优化压缩包判断字符串方法 2024-03-15 11:49:14 +08:00
gaoxiongzaq
ddefeb630a 恢复原来格式 2024-03-15 11:17:26 +08:00
高雄
f050701d64 更新记录文档
更新记录文档

Signed-off-by: 高雄 <admin@cxcp.com>
2024-03-14 04:02:00 +00:00
gaoxiongzaq
5a50327f8f 调整pom 2024-03-14 08:29:38 +08:00
gaoxiongzaq
b4cd038c86 修复 压缩包特殊符文无法访问问题 调整统一url输出为url编码解决特殊符号问题 调整跨域方法和下载方法为一样 支持重定向 2024-03-14 08:16:24 +08:00
kailing
9b22f9a412 !259 更新版本升级记录
Merge pull request !259 from 高雄/N/A
2024-03-13 11:37:06 +00:00
kailing
99aeeb5faa !276 升级CAD转换组件、优化CAD转换方法
Merge pull request !276 from 高雄/master
2024-03-13 11:36:23 +00:00
gaoxiongzaq
29b09965a3 升级CAD转换组件、优化CAD转换方法 2024-03-12 08:51:31 +08:00
kailing
312c31a426 !275 修复 url特殊符号无法下载或者输出问题 修复流接入方法 拼接字符导导致下载 或者跨域错误问题
Merge pull request !275 from 高雄/master
2024-03-11 03:21:13 +00:00
gaoxiongzaq
c54610caf6 修复 url特殊符号无法下载或者输出问题 修复流接入方法 拼接字符导导致下载或者跨域错误问题 2024-03-09 10:35:13 +08:00
陈精华
72014e1534 Merge pull request #538 from kekingcn/kl
feat: 新增预览文件 host 黑名单机制
2024-03-08 12:28:27 +08:00
kl
d407b88b67 feat: 新增预览文件 host 黑名单机制 2024-03-08 10:12:05 +08:00
kl
d1d8ffef7a feat: 新增预览文件 host 黑名单机制 2024-03-06 19:49:59 +08:00
kailing
787e9fe615 !271 调整压缩包 获取路径方法
Merge pull request !271 from 高雄/master
2024-03-06 07:39:41 +00:00
高雄
e79c53156b 调整压缩包 获取路径方法
调整压缩包 获取路径方法

Signed-off-by: 高雄 <admin@cxcp.com>
2024-03-06 07:35:37 +00:00
高雄
7dcd225cea 调整压缩包 获取路径方法
调整压缩包 获取路径方法

Signed-off-by: 高雄 <admin@cxcp.com>
2024-03-06 07:34:56 +00:00
kailing
3482ee51da !267 update server/src/main/bin/startup.sh.
Merge pull request !267 from stevenwmq/N/A
2024-02-21 03:12:01 +00:00
kailing
211df6965f !263 新增office转换 超时属性功能
Merge pull request !263 from 高雄/master
2024-02-21 03:10:58 +00:00
Moomel
448a700687 !253 修复:非法请求使过滤器失效,出现严重安全问题
* BaseUrlFilter 修改过滤全部路径,保证 BaseUrlFilter 优于UrlCheckFilter 执行
* 清除无用 html
* 非法请求过滤器: 修复请求 path 中包含 // 或者以 / 结尾导致其它过滤器失效,对请求进行重定向
* 非法请求过滤器: 替换 getRequestURI() 为 getServletPath()
* 非法请求过滤器: 截取 context-path
* 非法请求过滤器: 去除 context-path
* 非法请求过滤器: 排除首页path "/"
* 非法请求过滤器: 请求地址中包含"//"或者以"/"结尾时导致其他过滤器失效,比如 TrustHostFilter
2024-02-21 02:56:54 +00:00
stevenwmq
7d17dae1fd update server/src/main/bin/startup.sh.
获取pid时过滤grep进程本身并且筛选java程序(避免showlog影响,showlog也有kkFilePreview关键字),避免取到的pid不是真实的程序pid导致shutdown失败。


Signed-off-by: stevenwmq <stevenwmq@163.com>
2024-01-30 08:31:29 +00:00
高雄
20a5c1b494 新增office转换 超时属性功能
新增office转换 超时属性功能

Signed-off-by: 高雄 <admin@cxcp.com>
2024-01-02 03:09:03 +00:00
高雄
4852b1479b 新增office转换 超时属性功能
新增office转换 超时属性功能

Signed-off-by: 高雄 <admin@cxcp.com>
2024-01-02 03:05:53 +00:00
kailing
bef81a940e !262 修复压缩包中,中文文件被编码问题
Merge pull request !262 from 高雄/N/A
2023-12-26 09:07:24 +00:00
kailing
8441d18a7f !261 调整drawio 预览模式 ,修复预览模式切换编辑模式bug
Merge pull request !261 from 高雄/master
2023-12-26 09:06:43 +00:00
高雄
09f4400552 修复压缩包中,中文文件被编码问题
修复压缩包中,中文文件被编码问题

Signed-off-by: 高雄 <admin@cxcp.com>
2023-12-26 02:06:18 +00:00
高雄
4f422f5ef0 修复 drawio 预览模式 跳转到编辑模式 出现的bug
修复 drawio 预览模式 跳转到编辑模式 出现的bug

Signed-off-by: 高雄 <admin@cxcp.com>
2023-12-26 02:01:39 +00:00
高雄
fdd3bbd5c1 删除文件 server/src/main/resources/static/drawio/js/app.min.js 2023-12-26 02:00:00 +00:00
高雄
bb3c8a1188 修改drawio默认为预览模式
修改drawio默认为预览模式

Signed-off-by: 高雄 <admin@cxcp.com>
2023-12-26 01:59:19 +00:00
高雄
bad3db400b 更新版本升级记录
更新版本升级记录

Signed-off-by: 高雄 <admin@cxcp.com>
2023-12-21 03:25:32 +00:00
kl
8ac8cd8487 重构压缩文件判断逻辑 (#517)
* 重构压缩文件判断逻辑

* 重构压缩文件判断逻辑,移除无用的代码
2023-12-21 11:19:29 +08:00
kailing
a54cd75469 !258 修复特殊符号 转义错误
Merge pull request !258 from 高雄/N/A
2023-12-19 08:13:53 +00:00
kailing
26d8c7ab62 !257 修复二级压缩包 反代情况下获取路径错误
Merge pull request !257 from 高雄/master
2023-12-19 07:58:40 +00:00
gaoxiongzaq
6b802b6545 压缩包方法 标注路径详细说明 2023-12-19 15:55:21 +08:00
高雄
8d56923efc 修复特殊符号 转义错误
修复特殊符号 转义错误

Signed-off-by: 高雄 <admin@cxcp.com>
2023-12-19 06:38:27 +00:00
gaoxiongzaq
79b9d703dc 修复二级压缩包 反代情况下获取路径错误 2023-12-19 14:37:08 +08:00
kailing
a5d29a4e3c !250 修复CSV文件预览只显示100条的问题
Merge pull request !250 from 高雄/N/A
2023-12-19 02:12:32 +00:00
kailing
7a9b3f0b8f !255 统一命名规范,符合驼峰规则
Merge pull request !255 from 高雄/master
2023-12-19 02:03:00 +00:00
gaoxiongzaq
9de1ae8c11 统一命名规范,符合驼峰规则 2023-12-19 10:00:29 +08:00
gaoxiongzaq
218f9f0015 统一命名规范,符合驼峰规则 2023-12-19 09:06:22 +08:00
gaoxiongzaq
0c6ea7248a 统一命名规范,符合驼峰规则 2023-12-19 08:55:51 +08:00
kailing
13dfca016e !248 1.修复压缩包 二级目录无法解压问题 修改压缩包生成PDF路径 2.修复PDF 带密码缓存问题 新增PDF带密码缓存方法 userToken 3.精简OFFICE 转换代码 4.精简TIF转换代码 新增TIF转换图片缓存 修复tif错误文件不自动释放内存 等待其他修复 5.修复下载方法错 特殊符号下载错误
Merge pull request !248 from 高雄/qttiaozheng
2023-12-18 12:43:26 +00:00
陈精华
904b9497a0 自动检测已安装Office组件增加LibreOffice7.5 & 7.6 版本默认路径 2023-12-01 10:00:00 +08:00
kailing
69444a4d72 !243 解决定时清除缓存时,对于多媒体类型文件,只删除了磁盘缓存文件,导致再次预览时从缓存中获取到了一个不存在文件路径
Merge pull request !243 from zhh/master
2023-11-08 01:58:38 +00:00
kailing
7d67d0d857 !246 修复前端xlsx解析 打印问题 和其他问题
Merge pull request !246 from 高雄/xlsx
2023-11-06 03:56:14 +00:00
kailing
a95dda6c20 !249 tif解析更加智能化 支持被修改的图片格式
Merge pull request !249 from 高雄/N/A
2023-11-06 03:55:59 +00:00
高雄
148046f105 修复CSV文件预览只显示100条的问题
修复CSV文件预览只显示100条的问题

Signed-off-by: 高雄 <admin@cxcp.com>
2023-11-02 01:42:32 +00:00
高雄
6d01caee50 修复excel多sheet页预览时只能查看第一个sheet页 的问题
修复excel多sheet页预览时只能查看第一个sheet页 的问题

Signed-off-by: 高雄 <admin@cxcp.com>
2023-10-27 01:55:46 +00:00
gaoxiongzaq
9f9790d4fd 修复特殊符号 转义的问题 2023-10-25 11:35:08 +08:00
gaoxiongzaq
fdb5325e02 修复压缩包中的 cad创建带文件名的文件夹 2023-10-25 10:12:08 +08:00
gaoxiongzaq
be4080c80d 修复 视频格式 转换模式和预览模式 特征码通用的问题 修复压缩包创建带文件名的文件夹 2023-10-25 10:05:51 +08:00
gaoxiongzaq
a057808624 修复 压缩包 office 文件转换成jpg格式 路径获取错误问题 2023-10-24 17:56:44 +08:00
高雄
355a69b4fc tif解析更加智能化 支持被修改的图片格式
tif解析支持 伪格式的(比如jpg 修改后缀)

Signed-off-by: 高雄 <admin@cxcp.com>
2023-10-24 08:53:59 +00:00
gaoxiongzaq
7597864337 修复 下载方法 包含空格 和+转换错误的问题 调整下载方法输出报错方式 2023-10-24 16:51:26 +08:00
gaoxiongzaq
724db1936b 修复 cad 格式二级以上压缩包 不自动创建目录问题 2023-10-24 11:37:03 +08:00
gaoxiongzaq
75061d843a 修复 视频格式获取错误 不输出问题 2023-10-24 11:27:23 +08:00
gaoxiongzaq
502b21147d 修复 视频转换方式 在压缩包里面 不自动创建文件路径而导致的报错 2023-10-24 09:42:47 +08:00
gaoxiongzaq
deb91728d4 1.修复压缩包 二级目录无法解压问题 修改压缩包生成PDF路径
2.修复PDF 带密码缓存问题 新增PDF带密码缓存方法 userToken
3.精简OFFICE 转换代码
4.精简TIF转换代码 新增TIF转换图片缓存 修复tif错误文件不自动释放内存 等待其他修复
5.修复下载方法错 特殊符号下载错误
6.调整文件名 统一方法在FileHandlerService
7.新增判断文件名是否被URL转义
2023-10-23 17:06:05 +08:00
陈精华
790c29c205 !244 更新CAD转换组件版本
Merge pull request !244 from 高雄/cad23.7
2023-10-20 10:06:44 +00:00
gaoxiongzaq
b1bfd81a97 修复前端xlsx解析 打印问题 和其他问题 2023-10-20 15:43:45 +08:00
gaoxiongzaq
a056c9c6c9 更新CAD转换组件版本 2023-10-20 14:39:57 +08:00
陈精华
c559efcceb Merge pull request #498 from baboon-king/master
fix: duplicate query param of tifPreviewType on url
2023-10-20 11:34:52 +08:00
陈精华
8d5c987fe7 更新xlsx预览样式 2023-10-19 11:29:33 +08:00
BaboonKing
fa034d54b6 fix: duplicate query param of tifPreviewType on url 2023-10-18 13:46:50 +08:00
陈精华
e39e8bd907 更新xlsx预览样式 2023-10-17 18:15:20 +08:00
kailing
693b13e818 !241 修复video跨域配置导致视频无法预览问题
Merge pull request !241 from lujiaming/master
2023-10-13 06:34:40 +00:00
zhanghh
6cd22e0975 fix: 清除多媒体类型文件的缓存 2023-10-13 11:03:44 +08:00
lujiaming
22c881bbaa [fix] 修复video跨域配置导致视频无法预览问题 2023-10-07 20:36:05 +08:00
gitchenjh
3cfc51a4d7 Merge pull request 'fix: 增大小文本文件检测字符编码的正确率;处理并发隐患' (#3) from asiawu/kkFileView:master into master 2023-10-07 13:37:47 +08:00
“yaya”
3e08deb50e fix: 将解决并发问题的方式由锁改为局部变量 2023-10-07 12:48:02 +08:00
“yaya”
42cf6b2955 fix: 增大小文本文件检测字符编码的正确率;处理并发隐患 2023-10-06 16:22:32 +08:00
陈精华
02c64977cb index page delete file captcha dialog align center 2023-09-27 09:44:21 +08:00
kailing
32b0a46574 !239 update main pages
Merge pull request !239 from 陈精华/main-pages
2023-09-25 11:11:30 +00:00
陈精华
94a76a72a4 update index page 2023-09-25 14:32:54 +08:00
陈精华
bcb278dd0b update main pages 2023-09-25 10:38:19 +08:00
kl
8eab415430 sponsor update (#492) 2023-09-21 11:50:14 +08:00
陈精华
aa3108fe98 !236 修复图片预览不居中问题修复
Merge pull request !236 from lujiaming/master
2023-09-21 03:04:44 +00:00
kailing
56965b4ff4 !235 一个通用的文件服务器认证访问的设计,解决 https://www.gitlink.org.cn/kk-open/kkFileView/issues/3 的问题
Merge pull request !235 from YiwenXia/http
2023-09-20 15:03:36 +00:00
陈精华
6eaf04aa71 Merge remote-tracking branch 'origin/master' into origin-master 2023-09-20 22:19:27 +08:00
YiwenXia
5fe0dd3d29 调整 kk-proxy-authorization 参数从 header 头里获取,增强认证参数获取的安全性 2023-09-20 21:23:31 +08:00
kl
091c955363 微宏科技捐助 (#491) 2023-09-20 19:57:32 +08:00
lujiaming
f09d0d8279 [fix] 修复图片预览不居中问题 2023-09-20 14:23:43 +08:00
YiwenXia
713edcfb8d 一个通用的文件服务器认证访问的设计,解决 https://www.gitlink.org.cn/kk-open/kkFileView/issues/3 的问题 2023-09-19 23:32:45 +08:00
kailing
7e0f7f6608 !231 修复txt文本类 分页二次加载问题
Merge pull request !231 from 高雄/N/A
2023-09-18 10:28:52 +00:00
高雄
e4c29bf57f 修复txt文本类 分页二次加载问题
修复txt文本类 分页二次加载问题

Signed-off-by: 高雄 <admin@cxcp.com>
2023-09-11 07:03:18 +00:00
kailing
b2d0d50507 !226 更新tif解析文件 更加自能错误提醒
Merge pull request !226 from 高雄/tiff
2023-09-08 05:48:33 +00:00
高雄
8c480208df 更新tif解析文件 更加自能错误提醒
更新tif解析文件 更加自能错误提醒 

Signed-off-by: 高雄 <admin@cxcp.com>
2023-09-07 10:32:14 +00:00
高雄
b010e13de2 更新tif解析文件 更加自能错误提醒
更新tif解析文件 更加自能错误提醒 

Signed-off-by: 高雄 <admin@cxcp.com>
2023-09-07 08:26:48 +00:00
kailing
c2bfba865a !225 csv格式前端解析
Merge pull request !225 from 高雄/csv
2023-09-07 02:37:22 +00:00
高雄
b02debfc59 修改csv命名规范
修改csv命名规范 

Signed-off-by: 高雄 <admin@cxcp.com>
2023-09-07 02:34:13 +00:00
高雄
978aa0dd68 修改csv命名规范
修改csv命名规范

Signed-off-by: 高雄 <admin@cxcp.com>
2023-09-07 02:31:23 +00:00
高雄
14ecf66c70 重命名 server/src/main/resources/web/officecsv.ftl 为 server/src/main/resources/web/csv.ftl 2023-09-07 02:29:36 +00:00
高雄
0563fde951 修改csv命名规范
修改csv命名规范

Signed-off-by: 高雄 <admin@cxcp.com>
2023-09-07 02:29:05 +00:00
gaoxiongzaq
8f37e85aa6 更新tif解析文件 更加自能错误提醒 2023-09-06 13:53:42 +08:00
gaoxiongzaq
0c4e5bc420 csv格式前端解析 2023-09-06 09:34:38 +08:00
kailing
8b6e7dcbdc !222 更换视频播放插件为ckplayer,新增mpd,m3u8,ts,mpeg,m4a格式支持
Merge pull request !222 from 高雄/vode
2023-09-04 09:49:27 +00:00
高雄
48fe534e77 修复误加3gp格式
修复误加3gp格式

Signed-off-by: 高雄 <admin@cxcp.com>
2023-09-04 09:23:15 +00:00
gaoxiongzaq
6da291e6e3 更换视频播放插件为ckplayer,新增mpd,m3u8,ts,mpeg,3gp,m4a格式支持 2023-09-02 13:43:24 +08:00
陈精华
d49b444462 update github workflow script 2023-09-01 16:09:38 +08:00
kl
692bb8f964 重构下载文件的代码,修复文件重新下载的问题 (#485)
* 重构下载文件的代码,修复文件重新下载的问题

* fix: 修复可能得空指针问题
2023-08-31 10:47:41 +08:00
陈精华
c2abe2f34c update Dockerfile_arm64 2023-08-29 16:20:31 +08:00
陈精华
133973c987 Merge pull request #484 from asiaWu3/master
feat: 新增arm64下的dockerfile
2023-08-24 09:15:58 +08:00
陈精华
8a35eb5d3e !220 更新bootstrap组件 并精简掉不需要的文件
Merge pull request !220 from 高雄/bootstrap
2023-08-23 08:54:48 +00:00
陈精华
b1fbeb52a5 !219 首页新增 搜索 定位页码 定义显示多少内容
Merge pull request !219 from 高雄/heom
2023-08-23 08:54:10 +00:00
gaoxiongzaq
674cbb9bf5 更新bootstrap组件 并精简掉不需要的文件 2023-08-22 10:22:18 +08:00
gaoxiongzaq
6f53b41baf 首页新增 搜索 定位页码 定义显示多少内容 2023-08-22 10:16:02 +08:00
kailing
381e1d6b43 !218 配置文件分类调整,按照模块分类调整 以后更加直观找到需要的功能
Merge pull request !218 from 高雄/peizhi
2023-08-22 02:01:48 +00:00
gaoxiongzaq
779c7c77b7 配置文件分类调整,按照模块分类调整 以后更加直观找到需要的功能 2023-08-22 09:02:26 +08:00
kailing
096426b8e2 !217 [fixed] getRelFilePath 返回null 导致KkFileUtils.isAllowedUpload的空指针异常修复
Merge pull request !217 from lujiaming/master
2023-08-21 15:39:30 +00:00
lujiaming
d8146f0495 [fixed] getRelFilePath 返回null 导致KkFileUtils.isAllowedUpload的空指针异常 2023-08-21 14:44:20 +08:00
“yaya”
be4f3d06e8 feat: 新增arm64下的dockerfile 2023-08-19 20:07:36 +08:00
lujiaming
da784aea84 [fixed] getRelFilePath 返回null 导致KkFileUtils.isAllowedUpload的空指针异常 2023-08-17 13:56:59 +08:00
kailing
bb3b5b3dff !210 [hotfix] 修复容器中仍有几率因生命周期,getCadThread = 0导致线程池创建失败问题
Merge pull request !210 from lujiaming/master
2023-08-16 02:09:50 +00:00
kailing
ad3e38285f !214 更新PDF.JS解析组件 新增:控制签名/绘图/插图控制方法
Merge pull request !214 from 高雄/pdf22
2023-08-16 02:08:43 +00:00
gaoxiongzaq
60dfefd37c 更新PDF.JS解析组件 新增:控制签名/绘图/插图控制方法 2023-08-16 09:38:47 +08:00
gaoxiongzaq
8268fc796e 更新PDF.JS解析组件 新增:控制签名/绘图/插图控制方法 2023-08-16 09:04:12 +08:00
gaoxiongzaq
98f83d9be1 升级 DCM解析组件 2023-08-16 08:49:27 +08:00
gaoxiongzaq
c39a205cea ofd 增加支持jp2、tiff图片渲染处理;优化双层OFD文本渲染效果;优化文本复制功能;提升OFD解析兼容性. 2023-08-16 08:44:44 +08:00
lujiaming
1671fc3572 [hotfix] 修复容器中仍有几率因生命周期,getCadThread = 0导致线程池创建失败问题 2023-08-14 20:19:28 +08:00
kailing
e550df3e8b !207 更新epub版本,优化epub显示效果
Merge pull request !207 from 高雄/N/A
2023-08-14 11:27:29 +00:00
kailing
930cd2b09b !208 更新epub版本,优化epub显示效果
Merge pull request !208 from 高雄/N/A
2023-08-14 11:26:30 +00:00
kailing
36672da026 !209 优化OFD 移动端预览 页面不自适应
Merge pull request !209 from 高雄/N/A
2023-08-14 11:26:12 +00:00
kl
5f1e5c8f4b 重构验证码生成方法 (#481) 2023-08-14 13:20:33 +08:00
陈精华
b71442543d !206 [hotfix] 修复因生命周期,getCadThread = 0导致线程池创建失败问题
Merge pull request !206 from lujiaming/master
2023-08-14 03:49:49 +00:00
高雄
146920496e 优化OFD 移动端预览 页面不自适应
优化OFD 移动端预览 页面不自适应

Signed-off-by: 高雄 <admin@cxcp.com>
2023-08-14 03:40:03 +00:00
高雄
cfa5771b8e 更新epub版本,优化epub显示效果
更新epub版本,优化epub显示效果 

Signed-off-by: 高雄 <admin@cxcp.com>
2023-08-14 03:35:39 +00:00
高雄
25e77448d1 更新epub版本,优化epub显示效果
更新epub版本,优化epub显示效果

Signed-off-by: 高雄 <admin@cxcp.com>
2023-08-14 03:34:44 +00:00
lujiaming
4a0409953a [hotfix] 修复因生命周期,getCadThread = 0导致线程池创建失败问题 2023-08-11 19:19:55 +08:00
kailing
fa2a5d3e35 !205 修复bpmn不支持跨域的问题
Merge pull request !205 from 高雄/N/A
2023-08-11 09:09:07 +00:00
kailing
7c1c8a43e8 !204 修复drawio缺少base64组件的问题
Merge pull request !204 from 高雄/N/A
2023-08-11 09:08:50 +00:00
kl
0a8be8ac95 重构验证码删除文件的实现逻辑 (#479)
* 重构验证码删除文件的实现逻辑

* 移除未使用的依赖

* 微调描述信息
2023-08-11 16:39:07 +08:00
高雄
0732344e79 修复bpmn不支持跨域的问题
修复bpmn不支持跨域的问题

Signed-off-by: 高雄 <admin@cxcp.com>
2023-08-11 06:15:56 +00:00
高雄
c8a7371e07 修复drawio缺少base64组件的问题
修复drawio缺少base64组件的问题

Signed-off-by: 高雄 <admin@cxcp.com>
2023-08-11 06:15:15 +00:00
kailing
aa49cc6ac0 !195 升级相关组件
Merge pull request !195 from 高雄/N/A
2023-08-10 03:07:54 +00:00
kailing
cc01769f8f !202 删除不必要的判断
Merge pull request !202 from qinfen180/dev-test
2023-08-10 03:07:12 +00:00
chezhuang
8a613513aa refactor: Remove unnecessary 'password==null" condition 2023-08-09 21:53:40 +08:00
陈精华
c249f68972 !201 修复epub 跨域报错问题
Merge pull request !201 from 高雄/N/A
2023-08-06 14:14:47 +00:00
陈精华
5ecfb39a9e !199 升级markdown组件 修复markdown被转义问题
Merge pull request !199 from 高雄/N/A
2023-08-06 14:14:16 +00:00
陈精华
f8039102bf !198 更新markdown组件
Merge pull request !198 from 高雄/N/A
2023-08-06 14:13:29 +00:00
陈精华
88fc5910e9 !197 更新 更新记录文档
Merge pull request !197 from 高雄/N/A
2023-08-06 14:13:17 +00:00
陈精华
41e8042bc7 !196 修改说明文档
Merge pull request !196 from 高雄/N/A
2023-08-06 14:12:39 +00:00
高雄
a45a592a39 修复epub 跨域报错问题
修复epub 跨域报错问题

Signed-off-by: 高雄 <admin@cxcp.com>
2023-08-03 07:16:00 +00:00
高雄
53cc923f1e 更新markdown组件 添加转义方法
更新markdown组件 添加转义方法

Signed-off-by: 高雄 <admin@cxcp.com>
2023-08-01 07:16:46 +00:00
高雄
e653eeb5c6 更新markdown组件
更新markdown组件

Signed-off-by: 高雄 <admin@cxcp.com>
2023-08-01 07:15:08 +00:00
高雄
6e7559577c 更新 更新记录文档
更新 更新记录文档

Signed-off-by: 高雄 <admin@cxcp.com>
2023-07-31 09:10:19 +00:00
高雄
7455f8279e 修改说明文档
修改说明文档

Signed-off-by: 高雄 <admin@cxcp.com>
2023-07-31 09:08:08 +00:00
高雄
149e7de7fc 升级相关组件
升级相关组件

Signed-off-by: 高雄 <admin@cxcp.com>
2023-07-31 08:18:39 +00:00
kailing
824dbb4e45 !194 【轻量级 PR】:修复 由于疏忽导致的多余的 }符号
Merge pull request !194 from 高雄/N/A
2023-07-28 23:47:35 +00:00
高雄
8fef5c595d 修复 由于疏忽导致的多余的 }符号
修复 由于疏忽导致的多余的 }符号

Signed-off-by: 高雄 <admin@cxcp.com>
2023-07-28 14:32:49 +00:00
陈精华
017a7dccb8 !193 跨域方法 支持重定向
Merge pull request !193 from 高雄/N/A
2023-07-28 09:02:03 +00:00
陈精华
079fe5e7b0 !190 下载方法 支持重定向
Merge pull request !190 from 高雄/N/A
2023-07-28 09:01:51 +00:00
陈精华
1e03307657 !188 优化后台 接入BASE64报错信息
Merge pull request !188 from 高雄/N/A
2023-07-28 09:01:06 +00:00
高雄
ccaba78e8d 跨域方法 支持重定向
跨域方法 支持重定向

Signed-off-by: 高雄 <admin@cxcp.com>
2023-07-28 06:42:13 +00:00
高雄
75fe682433 下载方法 支持重定向
下载方法 支持重定向 

Signed-off-by: 高雄 <admin@cxcp.com>
2023-07-28 06:36:23 +00:00
高雄
fb6320a244 update server/src/main/java/cn/keking/utils/WebUtils.java.
优化后台 接入BASE64报错信息

Signed-off-by: 高雄 <admin@cxcp.com>
2023-07-28 00:56:14 +00:00
陈精华
3da330341f !187 优化 pdf转换图片 报错信息
Merge pull request !187 from 高雄/pdf3
2023-07-26 05:46:40 +00:00
asiawu
31c7b2dfb8 重构了EncodingDetectors#getJavaEncode(String filePath)方法,并附带部分测试数据
重构了EncodingDetectors#getJavaEncode(String filePath)方法,并附带部分测试数据
Co-authored-by: asiawu <asiawu3@qq.com>
Co-committed-by: asiawu <asiawu3@qq.com>
2023-07-24 17:15:07 +08:00
陈精华
d2a8ca2cdd !186 新增xbrl格式
Merge pull request !186 from 高雄/xbrl
2023-07-24 03:30:59 +00:00
陈精华
16fca7ec61 !185 修复PDF解密加密文件 转换成功后台报错问题
Merge pull request !185 from 高雄/pdf2
2023-07-24 03:30:26 +00:00
陈精华
39d8d38ee9 !184 修复office转换加密文档 PDF不生成密码问题
Merge pull request !184 from 高雄/pdf
2023-07-24 03:30:09 +00:00
陈精华
99982f07f7 !183 调整 验证码 样式 为弹窗显示
Merge pull request !183 from 高雄/N/A
2023-07-24 03:29:33 +00:00
gaoxiongzaq
1246a853b5 优化 pdf转换图片 报错信息 2023-07-24 10:18:09 +08:00
gaoxiongzaq
6382453327 新增xbrl格式 2023-07-24 09:47:04 +08:00
gaoxiongzaq
4ebee74f70 修复PDF解密加密文件 转换成功后台报错问题 2023-07-24 09:41:00 +08:00
gaoxiongzaq
54750f4e06 修复转换加密文档 PDF不生成密码问题 2023-07-24 09:39:20 +08:00
高雄
1225362c90 调整 验证码 样式 为弹窗显示
调整 验证码 样式 为弹窗显示

Signed-off-by: 高雄 <admin@cxcp.com>
2023-07-24 01:10:29 +00:00
陈精华
fe5ad49008 !175 验证码方法 代码优化
Merge pull request !175 from 高雄/code1
2023-07-22 06:35:37 +00:00
陈精华
586561ec5a fix some typo 2023-07-22 14:33:02 +08:00
陈精华
cad2d58f44 CAD默认预览模式调整为svg 2023-07-22 14:31:22 +08:00
陈精华
4f86a56f59 !180 优化 CAD转换功能 新增CAD线程控制和CAD超时限制
Merge pull request !180 from 陈精华/cad
2023-07-22 06:26:13 +00:00
gaoxiongzaq
c86ca0d8cf 优化 CAD转换功能 新增CAD线程控制和CAD超时限制 2023-07-22 14:22:31 +08:00
陈精华
ec633cc0e1 !179 验证码方法 代码优化
Merge pull request !179 from 陈精华/captcha
2023-07-22 06:14:33 +00:00
陈精华
fa2a2b4342 !178 office 功能调整 支持批注 转换页码限制 生成水印等等
Merge pull request !178 from 陈精华/office1
2023-07-22 06:14:24 +00:00
gaoxiongzaq
2b456c9934 验证码方法 代码优化
(cherry picked from commit da5dac73ab)
2023-07-22 14:01:56 +08:00
陈精华
7965d52f29 office 功能调整 支持批注 转换页码限制 生成水印等等 2023-07-22 13:42:29 +08:00
陈精华
ad322c2e10 !173 升级 CAD转换组件
Merge pull request !173 from 高雄/cad1
2023-07-22 04:27:36 +00:00
gaoxiongzaq
da5dac73ab 验证码方法 代码优化 2023-07-22 08:53:50 +08:00
gaoxiongzaq
b5e711bf87 office 功能调整 支持批注 转换页码限制 生成水印等等 2023-07-22 08:51:23 +08:00
gaoxiongzaq
535d2baf0b 升级 CAD转换组件 2023-07-22 08:45:21 +08:00
高雄
294dcb1994 !170 删除功能 新增验证码方法
删除功能 新增验证码方法
2023-07-21 09:52:27 +00:00
陈精华
c54a5e9f1a !166 CAD格式新增支持 转换成svg tif 格式 CAD 转换新增 超时结束方法
Merge pull request !166 from 高雄/cad
2023-07-21 09:50:49 +00:00
陈精华
3571f2b502 !165 启用 GZIP压缩
Merge pull request !165 from 高雄/gzip
2023-07-21 09:50:05 +00:00
gaoxiongzaq
6f8416365f CAD格式新增支持 转换成svg tif 格式
CAD 转换新增 超时结束方法
2023-07-20 10:54:47 +08:00
gaoxiongzaq
778a381b5b 启用 GZIP压缩 2023-07-20 09:12:30 +08:00
gaoxiongzaq
770769ead5 启用 GZIP压缩 2023-07-20 09:06:50 +08:00
陈精华
8d49abb797 !163 更新说明文档
Merge pull request !163 from 高雄/master
2023-07-14 07:48:21 +00:00
高雄
d0568c53dc 更新说明文档
Merge pull request !1 from 陈精华/N/A
2023-07-13 06:30:06 +00:00
陈精华
276ef9d704 update README.cn.md.
Signed-off-by: 陈精华 <842761733@qq.com>
2023-07-12 07:16:58 +00:00
高雄
dd75f718aa 更新说明文档
更新说明文档

Signed-off-by: 高雄 <admin@cxcp.com>
2023-07-10 09:26:15 +00:00
陈精华
0ece6ccb51 !161 修复 forceUpdatedCache 属性设置,但是本地缓存文件不更新缺陷
Merge pull request !161 from lujiaming/N/A
2023-07-10 07:51:51 +00:00
lujiaming
bbd7530f77 修复 forceUpdatedCache 属性设置,但是本地缓存文件不更新缺陷
Signed-off-by: lujiaming <1451771613@qq.com>
2023-07-10 07:43:23 +00:00
陈精华
2cfd692171 update officeweb.ftl 2023-07-10 13:59:56 +08:00
1850 changed files with 757597 additions and 695417 deletions

5
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: "Security Report / 安全漏洞报告"
url: "https://github.com/kekingcn/kkFileView/security/advisories/new"
about: "For sensitive security issues, please use private security report. / 涉及敏感安全问题请使用私密安全报告。"

View File

@@ -0,0 +1,76 @@
name: "Feature Request / 功能建议"
description: "Propose a new feature with clear use case and acceptance criteria. / 提交功能建议,请明确场景与验收标准。"
title: "[FEATURE] "
labels: ["type/feature", "priority/p2", "status/needs-info"]
body:
- type: markdown
attributes:
value: |
Thanks for your idea! / 感谢你的建议
Please provide concrete business scenarios and the expected behavior.
请尽量提供明确业务场景和期望行为便于评估优先级与实现方案
For urgent production issues, you can use our Knowledge Planet channel for faster processing:
https://wx.zsxq.com/group/48844125114258
如为线上紧急问题可通过知识星球渠道加速处理
https://wx.zsxq.com/group/48844125114258
- type: textarea
id: background
attributes:
label: "Background / 背景"
description: "What problem are you trying to solve? / 你要解决什么问题?"
placeholder: "Describe current pain points... / 描述当前痛点..."
validations:
required: true
- type: textarea
id: proposal
attributes:
label: "Proposal / 建议方案"
description: "What do you expect kkFileView to support? / 期望 kkFileView 支持什么?"
placeholder: "Describe expected feature behavior... / 描述期望功能行为..."
validations:
required: true
- type: textarea
id: use_case
attributes:
label: "Use Case / 使用场景"
description: "Provide 1-3 concrete scenarios. / 提供 1-3 个具体场景"
placeholder: |
Scenario 1:
Scenario 2:
validations:
required: true
- type: textarea
id: alternatives
attributes:
label: "Alternatives / 备选方案"
description: "What alternatives have you considered? / 是否考虑过替代方案?"
placeholder: "Existing workaround or alternative... / 当前替代做法..."
validations:
required: false
- type: textarea
id: acceptance
attributes:
label: "Acceptance Criteria / 验收标准"
description: "How do we know this feature is done? / 如何判断该功能完成?"
placeholder: |
- [ ] Criterion 1
- [ ] Criterion 2
validations:
required: true
- type: checkboxes
id: checklist
attributes:
label: "Checklist / 提交前检查"
options:
- label: "I have searched existing issues and did not find a duplicate feature request. / 我已搜索现有 issue未发现重复功能建议"
required: true
- label: "I provided concrete use cases and expected behavior. / 我已提供具体使用场景和期望行为"
required: true

121
.github/ISSUE_TEMPLATE/issue-report.yml vendored Normal file
View File

@@ -0,0 +1,121 @@
name: "Issue Report / 问题反馈"
description: "Please provide complete required information to help us reproduce and follow up. / 请完整填写必填信息,便于复现与跟进。"
title: "[ISSUE] "
labels: ["status/needs-info"]
body:
- type: markdown
attributes:
value: |
Thanks for your report! / 感谢反馈
**Please fill in all required fields.**
**请完整填写所有必填项**
Incomplete issues may be closed and asked to resubmit.
信息不完整的问题可能会被关闭并要求重新提交
For urgent production issues, you can use our Knowledge Planet channel for faster processing:
https://wx.zsxq.com/group/48844125114258
如为线上紧急问题可通过知识星球渠道加速处理
https://wx.zsxq.com/group/48844125114258
- type: dropdown
id: issue_type
attributes:
label: "Issue Type / 问题类型"
description: "Select the closest type. / 请选择最接近的问题类型"
options:
- "Bug / 缺陷"
- "Performance / 性能问题"
- "Security / 安全问题"
- "Question / 使用咨询"
validations:
required: true
- type: input
id: kkfileview_version
attributes:
label: "kkFileView Version / kkFileView 版本"
placeholder: "e.g. 4.4.0"
validations:
required: true
- type: input
id: deploy_mode
attributes:
label: "Deployment Mode / 部署方式"
description: "jar / docker / k8s / source, etc. / jar / docker / k8s / 源码部署等"
placeholder: "e.g. docker"
validations:
required: true
- type: textarea
id: environment
attributes:
label: "Environment / 环境信息"
description: "OS, JDK, LibreOffice/OpenOffice, browser, reverse proxy, etc. / 操作系统、JDK、Office组件、浏览器、反向代理等"
placeholder: |
- OS:
- JDK:
- LibreOffice/OpenOffice:
- Browser:
- Proxy (Nginx/Ingress):
validations:
required: true
- type: textarea
id: reproduce_steps
attributes:
label: "Steps to Reproduce / 复现步骤"
description: "Provide clear, minimal, reproducible steps. / 提供清晰、最小可复现步骤"
placeholder: |
1) ...
2) ...
3) ...
validations:
required: true
- type: textarea
id: expected_result
attributes:
label: "Expected Result / 期望结果"
placeholder: "What should happen? / 期望实际应该出现什么结果?"
validations:
required: true
- type: textarea
id: actual_result
attributes:
label: "Actual Result / 实际结果"
placeholder: "What happened instead? / 实际发生了什么?"
validations:
required: true
- type: textarea
id: logs
attributes:
label: "Logs & Screenshots / 日志与截图"
description: "Paste key logs/error stack and attach screenshots (mask sensitive data). / 粘贴关键日志或异常堆栈,并上传截图(请脱敏)"
render: shell
validations:
required: true
- type: textarea
id: sample_file
attributes:
label: "Sample File / 样例文件(可选)"
description: "If possible, provide a minimal sample file or reproducible URL (desensitized). / 如可提供,请附最小样例文件或可复现 URL脱敏"
validations:
required: false
- type: checkboxes
id: checklist
attributes:
label: "Checklist / 提交前检查"
options:
- label: "I have searched existing issues and did not find a duplicate. / 我已搜索现有 issue未发现重复问题"
required: true
- label: "I can reproduce this issue on the stated version/environment. / 我可在上述版本与环境复现该问题"
required: true
- label: "I have masked sensitive information in logs/screenshots. / 我已对日志与截图中的敏感信息做脱敏处理"
required: true

117
.github/scripts/deploy_windows_winrm.py vendored Normal file
View File

@@ -0,0 +1,117 @@
#!/usr/bin/env python3
import base64
import os
import pathlib
import sys
import uuid
import winrm
def require_env(name: str) -> str:
value = os.getenv(name, "").strip()
if not value:
raise SystemExit(f"Missing required environment variable: {name}")
return value
def optional_env(name: str, default: str) -> str:
value = os.getenv(name, "").strip()
return value if value else default
def ps_quote(value: str) -> str:
return value.replace("'", "''")
def main() -> int:
host = require_env("KK_DEPLOY_HOST")
port = optional_env("KK_DEPLOY_PORT", "5985")
username = require_env("KK_DEPLOY_USERNAME")
password = require_env("KK_DEPLOY_PASSWORD")
env_pairs = {
"KK_DEPLOY_ROOT": optional_env("KK_DEPLOY_ROOT", r"C:\kkFileView-5.0"),
"KK_DEPLOY_HEALTH_URL": optional_env("KK_DEPLOY_HEALTH_URL", "http://127.0.0.1:8012/"),
"KK_DEPLOY_REPO_URL": optional_env("KK_DEPLOY_REPO_URL", "https://github.com/kekingcn/kkFileView.git"),
"KK_DEPLOY_BRANCH": optional_env("KK_DEPLOY_BRANCH", "master"),
"KK_DEPLOY_SOURCE_ROOT": optional_env("KK_DEPLOY_SOURCE_ROOT", r"C:\kkFileView-source"),
"KK_DEPLOY_JAVA_HOME": optional_env("KK_DEPLOY_JAVA_HOME", r"C:\Program Files\jdk-21.0.2"),
"KK_DEPLOY_GIT_EXE": optional_env("KK_DEPLOY_GIT_EXE", r"C:\kkFileView-tools\git\cmd\git.exe"),
"KK_DEPLOY_MVN_CMD": optional_env("KK_DEPLOY_MVN_CMD", r"C:\kkFileView-tools\maven\bin\mvn.cmd"),
"KK_DEPLOY_MAVEN_SETTINGS": optional_env("KK_DEPLOY_MAVEN_SETTINGS", ""),
"KK_DEPLOY_DRY_RUN": optional_env("KK_DEPLOY_DRY_RUN", "false").lower(),
}
script_path = pathlib.Path(__file__).with_name("remote_windows_deploy.ps1")
script_body = script_path.read_text(encoding="utf-8")
payload = script_body.encode("utf-8-sig")
payload_b64 = base64.b64encode(payload).decode("ascii")
endpoint = f"http://{host}:{port}/wsman"
session = winrm.Session(endpoint, auth=(username, password), transport="ntlm")
suffix = uuid.uuid4().hex
remote_b64_path = fr"C:\Windows\Temp\kkfileview_deploy_{suffix}.b64"
remote_ps1_path = fr"C:\Windows\Temp\kkfileview_deploy_{suffix}.ps1"
prep = session.run_ps(
f"""
$ErrorActionPreference = 'Stop'
if (Test-Path '{ps_quote(remote_b64_path)}') {{ Remove-Item '{ps_quote(remote_b64_path)}' -Force }}
if (Test-Path '{ps_quote(remote_ps1_path)}') {{ Remove-Item '{ps_quote(remote_ps1_path)}' -Force }}
New-Item -ItemType File -Path '{ps_quote(remote_b64_path)}' -Force | Out-Null
"""
)
if prep.status_code != 0:
sys.stderr.write(prep.std_err.decode("utf-8", errors="ignore"))
return prep.status_code
chunk_size = 1200
for start in range(0, len(payload_b64), chunk_size):
chunk = payload_b64[start : start + chunk_size]
append = session.run_ps(
f"Add-Content -LiteralPath '{ps_quote(remote_b64_path)}' -Value '{chunk}'"
)
if append.status_code != 0:
sys.stderr.write(append.std_err.decode("utf-8", errors="ignore"))
return append.status_code
result = session.run_ps(
f"""
$ErrorActionPreference = 'Stop'
$raw = Get-Content -LiteralPath '{ps_quote(remote_b64_path)}' -Raw
[System.IO.File]::WriteAllBytes('{ps_quote(remote_ps1_path)}', [Convert]::FromBase64String($raw))
try {{
"""
+ "\n".join(
f" $env:{key} = '{ps_quote(value)}'" for key, value in env_pairs.items()
)
+ f"""
powershell -NoProfile -ExecutionPolicy Bypass -File '{ps_quote(remote_ps1_path)}' `
$code = $LASTEXITCODE
}} finally {{
"""
+ "\n".join(
f" Remove-Item Env:{key} -ErrorAction SilentlyContinue" for key in env_pairs
)
+ f"""
Remove-Item '{ps_quote(remote_b64_path)}' -Force -ErrorAction SilentlyContinue
Remove-Item '{ps_quote(remote_ps1_path)}' -Force -ErrorAction SilentlyContinue
}}
exit $code
"""
)
stdout = result.std_out.decode("utf-8", errors="ignore").strip()
stderr = result.std_err.decode("utf-8", errors="ignore").strip()
if stdout:
print(stdout)
if stderr:
print(stderr, file=sys.stderr)
return result.status_code
if __name__ == "__main__":
raise SystemExit(main())

View File

@@ -0,0 +1,327 @@
$ErrorActionPreference = 'Stop'
$ProgressPreference = 'SilentlyContinue'
function Write-Step {
param([string]$Message)
Write-Host "==> $Message"
}
function Get-RequiredEnv {
param([string]$Name)
$Value = [Environment]::GetEnvironmentVariable($Name)
if ([string]::IsNullOrWhiteSpace($Value)) {
throw "Missing required environment variable: $Name"
}
return $Value
}
function Get-OptionalEnv {
param(
[string]$Name,
[string]$DefaultValue
)
$Value = [Environment]::GetEnvironmentVariable($Name)
if ([string]::IsNullOrWhiteSpace($Value)) {
return $DefaultValue
}
return $Value
}
$DeployRoot = Get-OptionalEnv 'KK_DEPLOY_ROOT' 'C:\kkFileView-5.0'
$HealthUrl = Get-OptionalEnv 'KK_DEPLOY_HEALTH_URL' 'http://127.0.0.1:8012/'
$RepoUrl = Get-OptionalEnv 'KK_DEPLOY_REPO_URL' 'https://github.com/kekingcn/kkFileView.git'
$Branch = Get-OptionalEnv 'KK_DEPLOY_BRANCH' 'master'
$SourceRoot = Get-OptionalEnv 'KK_DEPLOY_SOURCE_ROOT' 'C:\kkFileView-source'
$JavaHome = Get-OptionalEnv 'KK_DEPLOY_JAVA_HOME' 'C:\Program Files\jdk-21.0.2'
$GitExe = Get-OptionalEnv 'KK_DEPLOY_GIT_EXE' 'C:\kkFileView-tools\git\cmd\git.exe'
$MvnCmd = Get-OptionalEnv 'KK_DEPLOY_MVN_CMD' 'C:\kkFileView-tools\maven\bin\mvn.cmd'
$MavenSettings = Get-OptionalEnv 'KK_DEPLOY_MAVEN_SETTINGS' ''
$DryRun = Get-OptionalEnv 'KK_DEPLOY_DRY_RUN' 'false'
$BinDir = Join-Path $DeployRoot 'bin'
$StartupScript = Join-Path $BinDir 'startup.bat'
$ReleaseDir = Join-Path $DeployRoot 'releases'
$DeployTmp = Join-Path $DeployRoot 'deploy-tmp'
$BuildOutputDir = Join-Path (Join-Path $SourceRoot 'server') 'target'
if (-not (Test-Path $DeployRoot)) {
throw "Deploy root not found: $DeployRoot"
}
if (-not (Test-Path $BinDir)) {
throw "Bin directory not found: $BinDir"
}
if (-not (Test-Path $StartupScript)) {
throw "Startup script not found: $StartupScript"
}
$CurrentJar = Get-ChildItem $BinDir -Filter 'kkFileView-*.jar' | Sort-Object LastWriteTime -Descending | Select-Object -First 1
if (-not $CurrentJar) {
throw "No kkFileView jar found in $BinDir"
}
$JavaExe = Join-Path $JavaHome 'bin\java.exe'
if (-not (Test-Path $JavaExe)) {
throw "JDK 21 java executable not found: $JavaExe"
}
if (-not (Test-Path $GitExe)) {
throw "Git executable not found: $GitExe"
}
if (-not (Test-Path $MvnCmd)) {
throw "Maven executable not found: $MvnCmd"
}
if (-not [string]::IsNullOrWhiteSpace($MavenSettings) -and -not (Test-Path $MavenSettings)) {
throw "Maven settings file not found: $MavenSettings"
}
$JarName = $CurrentJar.Name
$JarPath = $CurrentJar.FullName
Write-Step "Deploy root: $DeployRoot"
Write-Step "Current jar: $JarPath"
Write-Step "Startup script: $StartupScript"
Write-Step "Health url: $HealthUrl"
Write-Step "Source root: $SourceRoot"
Write-Step "Branch: $Branch"
Write-Step "Git exe: $GitExe"
Write-Step "Maven cmd: $MvnCmd"
Write-Step "Java home: $JavaHome"
if (-not [string]::IsNullOrWhiteSpace($MavenSettings)) {
Write-Step "Maven settings: $MavenSettings"
}
function Invoke-External {
param(
[string]$FilePath,
[string[]]$Arguments,
[string]$WorkingDirectory = $null
)
$previous = $null
if ($WorkingDirectory) {
$previous = Get-Location
Set-Location $WorkingDirectory
}
try {
& $FilePath @Arguments
if ($LASTEXITCODE -ne 0) {
throw "Command failed ($LASTEXITCODE): $FilePath $($Arguments -join ' ')"
}
} finally {
if ($previous) {
Set-Location $previous
}
}
}
function Assert-SafeSourceRoot {
param([string]$PathToCheck)
$FullPath = [System.IO.Path]::GetFullPath($PathToCheck)
$RootPath = [System.IO.Path]::GetPathRoot($FullPath)
if ($FullPath.TrimEnd('\') -eq $RootPath.TrimEnd('\')) {
throw "Refusing to use drive root as source root: $FullPath"
}
$DangerousLeafNames = @(
'Windows',
'Users',
'Program Files',
'Program Files (x86)',
'ProgramData'
)
$LeafName = Split-Path -Leaf $FullPath.TrimEnd('\')
if ($DangerousLeafNames -contains $LeafName) {
throw "Refusing to use a high-risk source root path: $FullPath"
}
}
$env:JAVA_HOME = $JavaHome
$env:Path = (Join-Path $JavaHome 'bin') + ';' + (Split-Path -Parent $GitExe) + ';' + (Split-Path -Parent $MvnCmd) + ';' + $env:Path
Write-Step 'Validating Git executable'
Invoke-External -FilePath $GitExe -Arguments @('--version')
Write-Step 'Validating Maven executable'
$MavenVersionArgs = @('-version')
if (-not [string]::IsNullOrWhiteSpace($MavenSettings)) {
$MavenVersionArgs = @('-s', $MavenSettings, '-version')
}
Invoke-External -FilePath $MvnCmd -Arguments $MavenVersionArgs
if ($DryRun -eq 'true') {
Write-Step "Dry run enabled, remote validation finished"
return
}
New-Item -ItemType Directory -Force -Path $ReleaseDir | Out-Null
New-Item -ItemType Directory -Force -Path $DeployTmp | Out-Null
function Sync-Repository {
Assert-SafeSourceRoot -PathToCheck $SourceRoot
if (-not (Test-Path (Join-Path $SourceRoot '.git'))) {
if (Test-Path $SourceRoot) {
Remove-Item $SourceRoot -Recurse -Force
}
$parent = Split-Path -Parent $SourceRoot
if ($parent) {
New-Item -ItemType Directory -Force -Path $parent | Out-Null
}
Write-Step "Cloning repository from $RepoUrl"
Invoke-External -FilePath $GitExe -Arguments @('clone', '--depth', '1', '--branch', $Branch, '--single-branch', $RepoUrl, $SourceRoot)
return
}
Write-Step "Fetching latest branch state from origin/$Branch"
Invoke-External -FilePath $GitExe -Arguments @('remote', 'set-url', 'origin', $RepoUrl) -WorkingDirectory $SourceRoot
Invoke-External -FilePath $GitExe -Arguments @('fetch', '--prune', '--depth', '1', 'origin', $Branch) -WorkingDirectory $SourceRoot
Invoke-External -FilePath $GitExe -Arguments @('checkout', '-B', $Branch, "origin/$Branch") -WorkingDirectory $SourceRoot
Invoke-External -FilePath $GitExe -Arguments @('reset', '--hard', "origin/$Branch") -WorkingDirectory $SourceRoot
Invoke-External -FilePath $GitExe -Arguments @('clean', '-fd') -WorkingDirectory $SourceRoot
}
function Build-KkFileView {
Write-Step 'Building kkFileView from source'
$BuildArgs = @('-B', 'clean', 'package', '-Dmaven.test.skip=true', '--file', 'pom.xml')
if (-not [string]::IsNullOrWhiteSpace($MavenSettings)) {
$BuildArgs = @('-s', $MavenSettings) + $BuildArgs
}
Invoke-External -FilePath $MvnCmd -Arguments $BuildArgs -WorkingDirectory $SourceRoot
}
Sync-Repository
Build-KkFileView
$DownloadedJars = Get-ChildItem $BuildOutputDir -Filter 'kkFileView-*.jar' -File
if (-not $DownloadedJars) {
throw "No kkFileView jar found in build output: $BuildOutputDir"
}
if ($DownloadedJars.Count -ne 1) {
throw "Expected exactly one kkFileView jar in build output, found $($DownloadedJars.Count)"
}
$DownloadedJar = $DownloadedJars[0]
$Timestamp = Get-Date -Format 'yyyyMMddHHmmss'
$BackupJar = Join-Path $ReleaseDir ("{0}.{1}.bak" -f $JarName, $Timestamp)
function Stop-KkFileView {
foreach ($Process in @(Get-KkFileViewJavaProcesses) + @(Get-KkFileViewLauncherProcesses)) {
Write-Step "Stopping process $($Process.ProcessId)"
Stop-Process -Id $Process.ProcessId -Force -ErrorAction SilentlyContinue
}
}
function Get-KkFileViewJavaProcesses {
$JarPattern = [regex]::Escape($JarName)
return Get-CimInstance Win32_Process | Where-Object {
$_.Name -match '^java(\.exe)?$' -and $_.CommandLine -and $_.CommandLine -match $JarPattern
}
}
function Get-KkFileViewLauncherProcesses {
$StartupPattern = [regex]::Escape([System.IO.Path]::GetFileName($StartupScript))
return Get-CimInstance Win32_Process | Where-Object {
$_.Name -ieq 'cmd.exe' -and $_.CommandLine -and $_.CommandLine -match $StartupPattern
}
}
function Wait-KkFileViewStopped {
param([int]$TimeoutSeconds = 30)
for ($i = 0; $i -lt $TimeoutSeconds; $i++) {
$JavaProcesses = @(Get-KkFileViewJavaProcesses)
$CmdProcesses = @(Get-KkFileViewLauncherProcesses)
if ((@($JavaProcesses).Count + @($CmdProcesses).Count) -eq 0) {
return $true
}
Start-Sleep -Seconds 1
}
return $false
}
function Start-KkFileView {
Write-Step "Starting kkFileView"
$CreateResult = Invoke-CimMethod -ClassName Win32_Process -MethodName Create -Arguments @{
CommandLine = ('cmd.exe /c ""' + $StartupScript + '""')
CurrentDirectory = $BinDir
}
if ($CreateResult.ReturnValue -ne 0) {
throw "Failed to start kkFileView launcher, Win32_Process.Create returned $($CreateResult.ReturnValue)"
}
Write-Step "Launcher process created with pid $($CreateResult.ProcessId)"
}
function Wait-Health {
param([string]$Url)
$SuccessfulChecks = 0
for ($i = 0; $i -lt 24; $i++) {
Start-Sleep -Seconds 5
try {
$Response = Invoke-WebRequest -Uri $Url -UseBasicParsing -TimeoutSec 5
if ($Response.StatusCode -eq 200 -and @(Get-KkFileViewJavaProcesses).Count -gt 0) {
$SuccessfulChecks++
} else {
$SuccessfulChecks = 0
}
if ($SuccessfulChecks -ge 3) {
return $true
}
} catch {
$SuccessfulChecks = 0
Start-Sleep -Milliseconds 200
}
}
return $false
}
Write-Step "Backing up current jar to $BackupJar"
Copy-Item $JarPath $BackupJar -Force
Stop-KkFileView
if (-not (Wait-KkFileViewStopped)) {
throw "Timed out waiting for the previous kkFileView process to exit"
}
Write-Step "Replacing jar with artifact output"
Copy-Item $DownloadedJar.FullName $JarPath -Force
Start-KkFileView
if (-not (Wait-Health -Url $HealthUrl)) {
Write-Step "Health check failed, rolling back"
Stop-KkFileView
if (-not (Wait-KkFileViewStopped)) {
throw "Timed out waiting for the failed kkFileView process to exit during rollback"
}
Copy-Item $BackupJar $JarPath -Force
Start-KkFileView
if (-not (Wait-Health -Url $HealthUrl)) {
throw "Deployment failed and rollback health check also failed"
}
throw "Deployment failed, rollback completed successfully"
}
Write-Step "Deployment completed successfully"

View File

@@ -0,0 +1,78 @@
name: Auto Close Old Issues (1y)
on:
schedule:
# Daily at 02:20 UTC
- cron: '20 2 * * *'
workflow_dispatch:
permissions:
issues: write
jobs:
close_old_issues:
runs-on: ubuntu-latest
steps:
- name: Close issues older than 1 year
uses: actions/github-script@v7
with:
script: |
const owner = context.repo.owner;
const repo = context.repo.repo;
const now = new Date();
const cutoff = new Date(now.getTime() - 365 * 24 * 60 * 60 * 1000);
const closeComment = ` Issue 已超过 1 年未活跃为便于维护当前问题队列先做关闭处理\n\n如该问题在最新版本仍存在欢迎直接 **Reopen** Issue或新建 Issue 并关联本单并补充\n1. 版本与部署方式\n2. 最小复现步骤\n3. 关键日志/截图请脱敏\n\n我们会优先跟进`;
let page = 1;
let processed = 0;
while (true) {
const { data: issues } = await github.rest.issues.listForRepo({
owner,
repo,
state: 'open',
per_page: 100,
page,
sort: 'created',
direction: 'asc'
});
if (!issues.length) break;
for (const issue of issues) {
// skip pull requests
if (issue.pull_request) continue;
const createdAt = new Date(issue.created_at);
if (createdAt > cutoff) {
// list is sorted asc by created time; remaining items are newer
core.info('Reached issues newer than cutoff, stop scanning.');
return;
}
try {
await github.rest.issues.createComment({
owner,
repo,
issue_number: issue.number,
body: closeComment,
});
await github.rest.issues.update({
owner,
repo,
issue_number: issue.number,
state: 'closed',
});
processed += 1;
core.info(`Closed #${issue.number}`);
} catch (e) {
core.warning(`Failed to close #${issue.number}: ${e.message}`);
}
}
page += 1;
}
core.info(`Done. Closed ${processed} old issues.`);

View File

@@ -0,0 +1,34 @@
name: Copilot Issue Auto Comment
on:
issues:
types: [opened]
workflow_dispatch:
permissions:
issues: write
jobs:
copilot_auto_comment:
runs-on: ubuntu-latest
steps:
- name: Ask Copilot to triage issue automatically
uses: actions/github-script@v7
with:
script: |
const issue = context.payload.issue;
if (!issue) return;
const owner = context.repo.owner;
const repo = context.repo.repo;
const body = `@Copilot 请自动分诊并直接给出可执行建议无需人工先介入\n\n- 先判断类型Bug / Performance / Security / Question / Feature\n- 检查 Issue 信息是否完整版本部署方式复现步骤日志\n- 若信息不完整请直接按模板列出缺失项并引导补充\n- 若信息较完整请给出下一步排查建议与最小复现建议\n- 若判断为已知问题或已修复请给出对应版本/修复方向\n\nIssue #${issue.number}\n标题${issue.title}\n链接${issue.html_url}\n\n---\n\n补充说明 / Support Notice:\n- GitHub Issues 会持续跟进处理 / We will continue to follow up through GitHub Issues.\n- 如为线上紧急问题可通过知识星球渠道加速处理 / For urgent production issues, you can use our Knowledge Planet channel for faster processing:\n https://wx.zsxq.com/group/48844125114258`;
await github.rest.issues.createComment({
owner,
repo,
issue_number: issue.number,
body,
});
core.info(`Copilot prompt comment posted to #${issue.number}`);

View File

@@ -0,0 +1,52 @@
name: Master Auto Deploy
on:
push:
branches: [ master ]
workflow_dispatch:
concurrency:
group: master-auto-deploy-production
cancel-in-progress: false
permissions:
contents: read
jobs:
deploy-windows:
runs-on: ubuntu-22.04
env:
KK_DEPLOY_HOST: ${{ secrets.KK_DEPLOY_HOST }}
KK_DEPLOY_PORT: ${{ secrets.KK_DEPLOY_PORT }}
KK_DEPLOY_USERNAME: ${{ secrets.KK_DEPLOY_USERNAME }}
KK_DEPLOY_PASSWORD: ${{ secrets.KK_DEPLOY_PASSWORD }}
KK_DEPLOY_ROOT: ${{ secrets.KK_DEPLOY_ROOT }}
KK_DEPLOY_HEALTH_URL: ${{ secrets.KK_DEPLOY_HEALTH_URL }}
KK_DEPLOY_REPO_URL: ${{ vars.KK_DEPLOY_REPO_URL }}
KK_DEPLOY_BRANCH: ${{ vars.KK_DEPLOY_BRANCH }}
KK_DEPLOY_SOURCE_ROOT: ${{ vars.KK_DEPLOY_SOURCE_ROOT }}
KK_DEPLOY_JAVA_HOME: ${{ vars.KK_DEPLOY_JAVA_HOME }}
KK_DEPLOY_GIT_EXE: ${{ vars.KK_DEPLOY_GIT_EXE }}
KK_DEPLOY_MVN_CMD: ${{ vars.KK_DEPLOY_MVN_CMD }}
KK_DEPLOY_MAVEN_SETTINGS: ${{ vars.KK_DEPLOY_MAVEN_SETTINGS }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install WinRM dependencies
run: pip install pywinrm
- name: Validate deploy secrets
run: |
test -n "$KK_DEPLOY_HOST" || (echo "Missing secret: KK_DEPLOY_HOST" && exit 1)
test -n "$KK_DEPLOY_USERNAME" || (echo "Missing secret: KK_DEPLOY_USERNAME" && exit 1)
test -n "$KK_DEPLOY_PASSWORD" || (echo "Missing secret: KK_DEPLOY_PASSWORD" && exit 1)
- name: Deploy to Windows server
run: python .github/scripts/deploy_windows_winrm.py

View File

@@ -11,14 +11,42 @@ on:
jobs:
build:
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: Set up JDK 8
uses: actions/setup-java@v2
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'adopt'
cache: maven
java-version: '21'
distribution: 'temurin' # 使用 Eclipse Temurin (AdoptOpenJDK 的继任者)
cache: 'maven'
- name: Cache Maven packages
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Build with Maven
run: mvn -B package --file pom.xml
run: mvn -B package -Dmaven.test.skip=true --file pom.xml
- name: Upload Linux distribution package
if: success()
uses: actions/upload-artifact@v4
with:
name: kkfileview-linux
path: server/target/*.tar.gz
retention-days: 7
- name: Upload Windows distribution package
if: success()
uses: actions/upload-artifact@v4
with:
name: kkfileview-windows
path: server/target/*.zip
retention-days: 7

118
.github/workflows/nightly-e2e.yml vendored Normal file
View File

@@ -0,0 +1,118 @@
name: Nightly E2E Full
on:
schedule:
- cron: '30 18 * * *' # 02:30 Asia/Shanghai
workflow_dispatch:
permissions:
contents: read
jobs:
e2e-nightly:
runs-on: ubuntu-latest
timeout-minutes: 50
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup JDK 21
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '21'
cache: maven
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: tests/e2e/package-lock.json
- name: Setup Python 3.11
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install LibreOffice + archive tools
run: |
sudo apt-get update
sudo apt-get install -y libreoffice zip p7zip-full
- name: Setup Python deps for office fixtures
run: |
python -m pip install --upgrade pip
pip install -r tests/e2e/requirements.txt
- name: Build kkFileView
run: mvn -q -pl server -DskipTests package
- name: Install E2E deps
working-directory: tests/e2e
run: |
npm ci
npx playwright install --with-deps chromium
- name: Start fixture server
run: |
cd tests/e2e/fixtures
python3 -m http.server 18080 > /tmp/fixture-server.log 2>&1 &
- name: Start kkFileView
run: |
JAR_PATH=$(ls server/target/kkFileView-*.jar | head -n 1)
nohup env KK_TRUST_HOST='*' KK_NOT_TRUST_HOST='10.*,172.16.*,192.168.*' java -jar "$JAR_PATH" > /tmp/kkfileview.log 2>&1 &
- name: Wait for services
run: |
fixture_ready=false
for i in {1..60}; do
if curl -fsS http://127.0.0.1:18080/sample.txt >/dev/null; then
fixture_ready=true
break
fi
sleep 1
done
if [ "$fixture_ready" != "true" ]; then
echo "Error: fixture server did not become ready within 60 seconds." >&2
exit 1
fi
kkfileview_ready=false
for i in {1..120}; do
if curl -fsS http://127.0.0.1:8012/ >/dev/null; then
kkfileview_ready=true
break
fi
sleep 1
done
if [ "$kkfileview_ready" != "true" ]; then
echo "Error: kkFileView service did not become ready within 120 seconds." >&2
exit 1
fi
- name: Run nightly E2E suites
working-directory: tests/e2e
env:
KK_BASE_URL: http://127.0.0.1:8012
FIXTURE_BASE_URL: http://127.0.0.1:18080
E2E_MAX_PREVIEW_MS: 20000
run: npm run test:ci
- name: Upload Playwright report
if: always()
uses: actions/upload-artifact@v4
with:
name: nightly-playwright-report
path: tests/e2e/playwright-report
- name: Upload service logs
if: always()
uses: actions/upload-artifact@v4
with:
name: nightly-e2e-service-logs
path: |
/tmp/kkfileview.log
/tmp/fixture-server.log

100
.github/workflows/pr-e2e-mvp.yml vendored Normal file
View File

@@ -0,0 +1,100 @@
name: PR E2E MVP
on:
pull_request:
branches: [master]
workflow_dispatch:
permissions:
contents: read
jobs:
e2e-mvp:
runs-on: ubuntu-latest
timeout-minutes: 40
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup JDK 21
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '21'
cache: maven
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: tests/e2e/package-lock.json
- name: Setup Python 3.11
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install LibreOffice + archive tools
run: |
sudo apt-get update
sudo apt-get install -y libreoffice zip p7zip-full
- name: Setup Python deps for office fixtures
run: |
python -m pip install --upgrade pip
pip install -r tests/e2e/requirements.txt
- name: Build kkFileView
run: mvn -q -pl server -DskipTests package
- name: Install E2E deps
working-directory: tests/e2e
run: |
npm install
npx playwright install --with-deps chromium
- name: Start fixture server
run: |
cd tests/e2e/fixtures
python3 -m http.server 18080 > /tmp/fixture-server.log 2>&1 &
- name: Start kkFileView
run: |
JAR_PATH=$(ls server/target/kkFileView-*.jar | head -n 1)
nohup env KK_TRUST_HOST='*' KK_NOT_TRUST_HOST='10.*,172.16.*,192.168.*' java -jar "$JAR_PATH" > /tmp/kkfileview.log 2>&1 &
- name: Wait for services
run: |
for i in {1..60}; do
curl -fsS http://127.0.0.1:18080/sample.txt >/dev/null && break
sleep 1
done
for i in {1..120}; do
curl -fsS http://127.0.0.1:8012/ >/dev/null && break
sleep 1
done
- name: Run E2E
working-directory: tests/e2e
env:
KK_BASE_URL: http://127.0.0.1:8012
FIXTURE_BASE_URL: http://127.0.0.1:18080
run: npm test
- name: Upload Playwright report
if: always()
uses: actions/upload-artifact@v4
with:
name: playwright-report
path: tests/e2e/playwright-report
- name: Upload service logs
if: always()
uses: actions/upload-artifact@v4
with:
name: e2e-service-logs
path: |
/tmp/kkfileview.log
/tmp/fixture-server.log

1
.gitignore vendored
View File

@@ -26,6 +26,7 @@ nbdist/
### VS Code ###
.vscode/
.DS_Store
.artifacts/
server/src/main/cache/
server/src/main/file/

View File

@@ -1,5 +1,4 @@
FROM keking/kkfileview-jdk:latest
MAINTAINER chenjh "842761733@qq.com"
FROM keking/kkfileview-base:4.4.0
ADD server/target/kkFileView-*.tar.gz /opt/
ENV KKFILEVIEW_BIN_FOLDER /opt/kkFileView-4.4.0-SNAPSHOT/bin
ENTRYPOINT ["java","-Dfile.encoding=UTF-8","-Dspring.config.location=/opt/kkFileView-4.4.0-SNAPSHOT/config/application.properties","-jar","/opt/kkFileView-4.4.0-SNAPSHOT/bin/kkFileView-4.4.0-SNAPSHOT.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"]

View File

@@ -1,6 +1,6 @@
# kkFileView
文档在线预览项目解决方案项目使用流行的spring boot搭建易上手和部署万能的文件预览开源项目基本支持主流文档格式预览
1. 支持 doc, docx, xls, xlsx, xlsm, ppt, pptx, csv, tsv, dotm, xlt, xltm, dot, dotx,xlam, xla ,pages Office 办公文档
1. 支持 doc, docx, xls, xlsx, xlsm, ppt, pptx, csv, tsv, dotm, xlt, xltm, dot, dotx,xlam, xla ,pages ,pptm Office 办公文档
2. 支持 wps, dps, et, ett, wpt 等国产 WPS Office 办公文档
3. 支持 odt, ods, ots, odp, otp, six, ott, fodt, fods 等OpenOfficeLibreOffice 办公文档
4. 支持 vsd, vsdx Visio 流程图文件
@@ -9,18 +9,18 @@
7. 支持 pdf ,ofd, rtf 等文档
8. 支持 xmind 软件模型文件
9. 支持 bpmn 工作流文件
10. 支持 eml 邮件文件
10. 支持 eml, msg 邮件文件
11. 支持 epub 图书文档
12. 支持 obj, 3ds, stl, ply, gltf, glb, off, 3dm, fbx, dae, wrl, 3mf, ifc, brep, step, iges, fcstd, bim 3D 模型文件
13. 支持 dwg, dxf, dwf, iges , igs, dwt, dng, ifc, dwfx, stl, cf2, plt CAD 模型文件
14. 支持 txt, xml(渲染), md(渲染), java, php, py, js, css 等所有纯文本
14. 支持 txt, xml(渲染), xbrl(渲染), md(渲染), java, php, py, js, css 等所有纯文本
15. 支持 zip, rar, jar, tar, gzip, 7z 等压缩包
16. 支持 jpg, jpeg, png, gif, bmp, ico, jfif, webp 等图片预览翻转缩放镜像
16. 支持 jpg, jpeg, png, gif, bmp, ico, jfif, webp ,heic ,heif等图片预览翻转缩放镜像
17. 支持 tif, tiff 图信息模型文件
18. 支持 tga 图像格式文件
19. 支持 svg 矢量图像格式文件
20. 支持 mp3,wav,mp4,flv 等音视频格式文件
21. 支持 avi,mov,rm,webm,ts,rm,mkv,mpeg,ogg,mpg,rmvb,wmv,3gp,ts,swf 等视频格式转码预览
21. 支持 avi,mov,rm,webm,ts,rm,mkv,mpeg,ogg,mpg,rmvb,wmv,3gp,ts 等视频格式转码预览
22. 支持 dcm 等医疗数位影像预览
23. 支持 drawio 绘图预览
@@ -42,9 +42,7 @@
地址[https://file.kkview.cn](https://file.kkview.cn)
### 项目文档Project documentation
1. 详细wiki文档https://gitee.com/kekingcn/file-online-preview/wikis/pages
1. 中文文档https://gitee.com/kekingcn/file-online-preview/blob/master/README.md
1. English documenthttps://gitee.com/kekingcn/file-online-preview/blob/master/README.en.md
1. 详细使用文档https://kkview.cn/zh-cn/docs/home.html
### 联系我们加入组织
> 我们会用心回答解决大家在项目使用中的问题也请大家在提问前至少 Google baidu 珍爱生命远离无效的交流沟通
@@ -53,61 +51,82 @@
### 文档预览效果
#### 1. 文本预览
支持所有类型的文本文档预览 由于文本文档类型过多无法全部枚举默认开启的类型如下 txt,html,htm,asp,jsp,xml,json,properties,md,gitignore,log,java,py,c,cpp,sql,sh,bat,m,bas,prg,cmd
支持所有类型的文本文档预览 由于文本文档类型过多无法全部枚举默认开启的类型如下 txt,html,htm,asp,jsp,xml,xbrl,json,properties,md,gitignore,log,java,py,c,cpp,sql,sh,bat,m,bas,prg,cmd
文本预览效果如下
![文本预览效果如下](https://kkview.cn/img/preview/preview-text.png)
![文本预览效果如下](./doc/img/preview/preview-text.png)
#### 2. 图片预览
支持jpgjpegpnggif等图片预览翻转缩放镜像预览效果如下
![图片预览](https://kkview.cn/img/preview/preview-image.png)
![图片预览](./doc/img/preview/preview-image.png)
#### 3. word文档预览
支持docdocx文档预览word预览有两种模式一种是每页word转为图片预览另一种是整个word文档转成pdf再预览pdf两种模式的适用场景如下
* 图片预览word文件大前台加载整个pdf过慢
* pdf预览内网访问加载pdf快
图片预览模式预览效果如下
![word文档预览1](https://kkview.cn/img/preview/preview-doc-image.png)
![word文档预览1](./doc/img/preview/preview-doc-image.png)
pdf预览模式预览效果如下
![word文档预览2](https://kkview.cn/img/preview/preview-doc-pdf.png)
![word文档预览2](./doc/img/preview/preview-doc-pdf.png)
#### 4. ppt文档预览
支持pptpptx文档预览和word文档一样有两种预览模式
图片预览模式预览效果如下
![ppt文档预览1](https://kkview.cn/img/preview/preview-ppt-image.png)
![ppt文档预览1](./doc/img/preview/preview-ppt-image.png)
pdf预览模式预览效果如下
![ppt文档预览2](https://kkview.cn/img/preview/preview-ppt-pdf.png)
![ppt文档预览2](./doc/img/preview/preview-ppt-pdf.png)
#### 5. pdf文档预览
支持pdf文档预览和word文档一样有两种预览模式
图片预览模式预览效果如下
![pdf文档预览1](https://kkview.cn/img/preview/preview-pdf-image.png)
![pdf文档预览1](./doc/img/preview/preview-pdf-image.png)
pdf预览模式预览效果如下
![pdf文档预览2](https://kkview.cn/img/preview/preview-pdf-pdf.png)
![pdf文档预览2](./doc/img/preview/preview-pdf-pdf.png)
#### 6. excel文档预览
支持xlsxlsx文档预览预览效果如下
![excel文档预览](https://kkview.cn/img/preview/preview-xls.png)
![excel文档预览](./doc/img/preview/preview-xls.png)
#### 7. 压缩文件预览
支持zip,rar,jar,tar,gzip等压缩包预览效果如下
![压缩文件预览1](https://kkview.cn/img/preview/preview-zip.png)
![压缩文件预览1](./doc/img/preview/preview-zip.png)
可点击压缩包中的文件名直接预览文件预览效果如下
![压缩文件预览2](https://kkview.cn/img/preview/preview-zip-inner.png)
![压缩文件预览2](./doc/img/preview/preview-zip-inner.png)
#### 8. 多媒体文件预览
理论上支持所有的视频音频文件由于无法枚举所有文件格式默认开启的类型如下
mp3,wav,mp4,flv
视频预览效果如下
![多媒体文件预览1](https://kkview.cn/img/preview/preview-video.png)
![多媒体文件预览1](./doc/img/preview/preview-video.png)
音频预览效果如下
![多媒体文件预览2](https://kkview.cn/img/preview/preview-audio.png)
![多媒体文件预览2](./doc/img/preview/preview-audio.png)
#### 9. CAD文档预览
支持CAD dwg文档预览和word文档一样有两种预览模式
图片预览模式预览效果如下
![cad文档预览1](https://kkview.cn/img/preview/preview-cad-image.png)
![cad文档预览1](./doc/img/preview/preview-cad-image.png)
pdf预览模式预览效果如下
![cad文档预览2](https://kkview.cn/img/preview/preview-cad-pdf.png)
![cad文档预览2](./doc/img/preview/preview-cad-pdf.png)
#### 10. Excel文件纯前端渲染效果
![Excel文件纯前端渲染效果](./doc/img/preview/preview-xlsx-web.png)
#### 11. 流程图bpmn文件预览效果
![流程图bpmn文件预览效果](./doc/img/preview/preview-bpmn.png)
#### 12. 3D模型文件预览效果
![3D模型文件预览效果](./doc/img/preview/preview-3ds.png)
#### 13. dcm医疗数位影像文件预览效果
![dcm医疗数位影像文件预览效果](./doc/img/preview/preview-dcm.png)
#### 14. drawio流程图预览效果
![drawio流程图预览效果](./doc/img/preview/preview-drawio.png)
考虑说明篇幅原因就不贴其他格式文件的预览效果了感兴趣的可以参考下面的实例搭建下
### 快速开始
@@ -116,6 +135,7 @@ pdf预览模式预览效果如下
- freemarker
- redisson
- jodconverter
> 依赖外部环境
- redis (可选默认不用)
- OpenOffice 或者 LibreOffice( Windows 下已内置Linux 脚本启动模式会自动安装Mac OS 下需要手动安装)
@@ -129,7 +149,172 @@ pdf预览模式预览效果如下
### 历史更新记录
> 2022年12月14日v4.1.0 版本发布
#### > 2026年01月20日v5.0 版本发布
#### 优化内容
1. xlsx 前端解析优化 - 提升Excel文件前端渲染性能
2. 图片解析优化 - 改进图片处理机制
3. tif 解析优化 - 增强TIF格式支持
4. svg 解析优化 - 优化SVG矢量图渲染
5. json 解析优化 - 改进JSON文件处理
6. ftp多客户端接入优化 - 提升FTP服务兼容性
7. 首页目录访问优化 - 采用post服务端分页机制
8. marked 解析优化 - 改进Markdown渲染
#### 新增功能
1. msg邮件解析 - 新增msg格式邮件文件预览支持
2. heic图片解析 - 新增HEIC格式图片预览支持
3. 跨域方法 - 新增跨域处理机制
4. 高亮方法 - 新增文本高亮功能
5. 页码方法 - 新增文档页码控制
6. AES加密方法 - 新增AES加密支持
7. Basic鉴权方法 - 新增Basic认证机制
8. 秘钥方法 - 新增密钥管理功能
9. 防重复转换 - 新增重复文件转换防护
10. 异步等待 - 新增异步处理机制
11. 上传限制 - 新增不支持文件上传限制
12. cadviewer转换方法 - 新增CAD查看器转换功能
#### 修复问题
1. 压缩包路径问题 - 修复压缩包内部路径处理
2. 安全问题 - 修复安全漏洞
3. 图片水印不全问题 - 修复水印显示不完整
4. SSL自签证书接入问题 - 修复自签名证书兼容性
#### 更新内容
1. JDK版本要求 - 强制要求JDK 21及以上版本
2. pdf前端解析更新 - 升级PDF前端渲染组件
3. odf前端解析更新 - 升级ODF文档前端渲染
4. 3D模型前端解析更新 - 升级3D模型查看器
5. pdf后端异步转换优化 - 实现多线程异步转换
6. tif后端异步转换优化 - 实现多线程异步转换
7. 视频后端异步转换优化 - 实现多线程异步转换
8. CAD后端异步转换优化 - 实现多线程异步转换
#### > 2025年01月16日v4.4.0 版本发布
### 新增功能
1. xlsx 新增支持打印功能
2. 配置文件新增启用 GZIP 压缩
3. CAD 格式新增支持转换成 SVG TIF 格式新增超时结束线程管理
4. 新增删除文件使用验证码校验
5. 新增 xbrl 格式预览支持
6. PDF 预览新增控制签名绘图插图控制搜索定位页码定义显示内容等功能
7. 新增 CSV 格式前端解析支持
8. 新增 ARM64 下的 Docker 镜像支持
9. 新增 Office 预览支持转换超时属性设置功能
10. 新增预览文件 host 黑名单机制
### 优化
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. 修复 forceUpdatedCache 属性设置但本地缓存文件不更新的问题
2. 修复 PDF 解密加密文件转换成功后后台报错的问题
3. 修复 BPMN 不支持跨域的问题
4. 修复压缩包二级反代特殊符号错误问题
5. 修复视频跨域配置导致视频无法预览的问题
6. 修复 TXT 文本类分页二次加载问题
7. 修复 Drawio 缺少 Base64 组件的问题
8. 修复 Markdown 被转义问题
9. 修复 EPUB 跨域报错问题
10. 修复 URL 特殊符号问题
11. 修复压缩包穿越漏洞
12. 修复压缩获取路径错误图片合集路径错误水印问题等 BUG
13. 修复前端解析 XLSX 包含 EMF 格式文件错误问题
#### > 2023年07月05日v4.3.0 版本发布
#### 新增功能:
1. 新增dcm等医疗数位影像预
2. 新增drawio绘图预览
3. 新增开启缓存的情况下重新生成的命令 &forceUpdatedCache=true
4. 新增dwg CAD文件预览
5. 新增PDF文件支持密码功能
6. 新增PDF文件生成图片的dpi自定义配置
7. 新增删除转换后OFFICECADTIFF压缩包源文件配置 默认开启 节约磁盘空间
8. 新增前端解析xlsx方法
9. 新增pages,eps, iges , igs, dwt, dng, ifc, dwfx, stl, cf2, plt等格式支持
#### 优化:
1. 调整生成的PDF文件 文件名称添加文件后缀 防止生成同名文件
2. 调整SQL文件预览方式
3. 优化OFD预览兼容性
4. 美化TXT文本 分页框的显示
5. 升级LinuxDocker版内置office为LibreOffice-7.5.3版本
6. 升级Windows版内置office为LibreOffice-7.5.3 Portable版本
7. 其他功能优化
#### 修复:
1. 修复反代情况下压缩包获取路径错误
2. 修复预览图片的url中如果包含&会导致.click报错
3. 修复OFD预览部分已知问题
4. 修复预览压缩包时如果点击的是文件目录树节点页面会报错
5. 其他已知问题修复
#### > 2023年04月18日v4.2.1 版本发布
#### 更新日志:
1. 修复 dwg 文件预览报空指针的 bug
#### > 2023年04月13日v4.2.0 版本发布
#### 新增功能:
1. 新增 SVG 格式文件预览支持
2. 新增加密的 Office 文件预览支持
3. 新增加密的 ziprar 等压缩包文件预览支持
4. 新增 xmind 软件模型文件预览支持
5. 新增 bpmn 工作流模型文件预览支持
6. 新增 eml 邮件文件预览支持
7. 新增 epub 电子书文件预览支持
8. 新增 dotm,ett,xlt,xltm,wpt,dot,xlam,xla,dotx 等格式的办公文档预览支持
9. 新增 obj, 3ds, stl, ply, gltf, glb, off, 3dm, fbx, dae, wrl, 3mf, ifc, brep, step, iges, fcstd, bim 3D 模型文件预览支持
10. 新增可配置限制高风险文件上传的功能比如 exe 文件
11. 新增可配置站点的备案信息
12. 新增演示站点删除文件需要密码的功能
#### 优化:
1. 文本文档预览加入缓存
2. 美化 404500 报错页
3. 优化发票等 ofd 文件预览的印证渲染兼容性
4. 移除 office-plugin 模块, 使用新版 jodconverter组件
5. 优化 Excel 文件的预览效果
6. 优化 CAD 文件的预览效果
7. 更新 xstream junrarpdfbox 等依赖的版本
8. 更新 TIF 文件转换 PDF 的插件添加转换缓存
9. 优化演示页 UI 部署
10. 压缩包文件预览支持目录
#### 修复:
1. 修复部分接口 XSS 问题
2. 修复控制台打印的演示地址不跟着 content-path 配置走的问题
3. 修复 ofd 文件预览跨域问题
4. 修复内部自签证书 https 协议 url 文件无法下载的问题
5. 修复特殊符号的文件无法删除的问题
6. 修复 PDF 转图片,内存无法回收导致的 OOM
7. 修复 xlsx7.4 以上版本文件预览乱码的问题
8. 修复 TrustHostFilter 未拦截跨域接口的问题这是一个安全问题有使用到 TrustHost 功能的务必升级
9. 修复压缩包文件预览在 Linux 系统下文件名乱码的问题
10. 修复 ofd 文件预览页码只能显示10页的问题
#### > 2022年12月14日v4.1.0 版本发布
1. 全新首页视觉 @wsd7747
2. tif图片预览兼容多页tif的pdf转换jpg转换以及jpg在线多页预览功能 @zhangzhen1979
@@ -142,7 +327,7 @@ pdf预览模式预览效果如下
感谢 @yl-yue @wsd7747 @zhangzhen1979 @tomhusky @shenghuadun @kischn.sun 的代码贡献
> 2021年7月6日v4.0.0 版本发布
#### > 2021年7月6日v4.0.0 版本发布
1. 底层集成OpenOffice替换为LibreOfficeOffice文件兼容性增强预览效果提升
2. 修复压缩文件目录穿越漏洞
@@ -153,7 +338,7 @@ pdf预览模式预览效果如下
7. 优化Windows环境下查找Office组件逻辑(内置的LibreOffice优先)
8. 优化启动Office进程改同步执行
> 2021年6月17日v3.6.0 版本发布
#### > 2021年6月17日v3.6.0 版本发布
ofd 类型文件支持版本本次版本重要功能均由社区开发贡献感谢 @gaoxingzaq@zhangxiaoxiao9527 的代码贡献
1. 新增 ofd 类型文件预览支持ofd 是国产的类似 pdf 格式的文件
@@ -161,7 +346,7 @@ ofd 类型文件支持版本,本次版本重要功能均由社区开发贡献
3. 美化了 pptpptx 类型文件预览效果比之前版本好看太多
4. 更新了 pdfboxxstreamcommon-io 等依赖的版本
> 2021年1月28日
#### > 2021年1月28日
2020农历年最后一个版本发布主要包含了部分 UI 改进和解决了 QQ 群友 Issue 里反馈的 Bug 修复最最重要的是发个新版过个好年
@@ -184,7 +369,7 @@ ofd 类型文件支持版本,本次版本重要功能均由社区开发贡献
17. escaping of dangerous characters to prevent reflected xss
18. 修复重复编码导致文档转图片预览失败的问题&编码规范
> 2020年12月27日
#### > 2020年12月27日
2020年年终大版本更新架构全面设计代码全面重构代码质量全面提升二次开发更便捷欢迎拉源码品鉴提issuepr共同建设
@@ -204,7 +389,7 @@ ofd 类型文件支持版本,本次版本重要功能均由社区开发贡献
14. 修复压缩包里文件再次预览失败的bug
15. 修复图片预览的bug
> 2020年05月20日
#### > 2020年05月20日
1. 新增支持全局水印并支持通过参数动态改变水印内容
2. 新增支持CAD文件预览
3. 新增base.url配置支持使用nginx反向代理和使用context-path
@@ -222,35 +407,35 @@ ofd 类型文件支持版本,本次版本重要功能均由社区开发贡献
15. 官网建设[https://kkview.cn](https://kkview.cn/)
16. 官方Docker镜像仓库建设[https://hub.docker.com/r/keking/kkfileview](https://hub.docker.com/r/keking/kkfileview)
> 2019年06月18日
#### > 2019年06月18日
1. 支持自动清理缓存及预览文件
2. 支持http/https下载流url文件预览
3. 支持FTP url文件预览
4. 加入Docker构建
> 2019年04月08日
#### > 2019年04月08日
1. 缓存及队列实现抽象提供JDK和REDIS两种实现(REDIS成为可选依赖)
2. 打包方式提供zip和tar.gz包并提供一键启动脚本
> 2018年01月19日
#### > 2018年01月19日
1. 大文件入队提前处理
1. 新增addTask文件转换入队接口
1. 采用redis队列支持kkFIleView接口和异构系统入队两种方式
> 2018年01月17日
#### > 2018年01月17日
1. 优化项目结构抽象文件预览接口更方便的加入更多的文件类型预览支持方便二次开发
1. 新增英文文档说明@幻幻Fate@汝辉贡献
1. 新增图片预览文件支持类型
1. 修复压缩包内轮播图片总是从第一张开始的问题
> 2018年01月12日
#### > 2018年01月12日
1. 新增多图片同时预览
1. 支持压缩包内图片轮番预览
> 2018年01月02日
#### > 2018年01月02日
1. 修复txt等文本编码问题导致预览乱码
1. 修复项目模块依赖引入不到的问题
@@ -265,14 +450,15 @@ xmind 引用于 [ xmind-embed-viewer](https://github.com/xmindltd/xmind-embed-v
epub 引用于 [ epub.js](https://github.com/futurepress/epub.js) 开源协议 BSD许可证
压缩包 引用于 [sevenzipjbinding](https://github.com/borisbrodski/sevenzipjbinding )开源协议LGPL
3D 引用于 [Online3DViewer](https://github.com/kovacsv/Online3DViewer )开源协议MIT
drawio 引用于 [drawio](https://github.com/jgraph/drawio )开源协议 Apache-2.0
bpmn流程图 引用于 [bpmn-js](https://github.com/bpmn-io/bpmn-js ) 自定义协议 保留水印 具体自行查看
dcm医疗数位影像 引用于 [dcmjs](https://github.com/dcmjs-org/dcmjs )开源协议MIT
### 使用登记
如果这个项目解决了你的实际问题可在 https://gitee.com/kekingcn/file-online-preview/issues/IGSBV
登记下如果节省了你的三方预览服务费用也愿意支持下的话可点击下方捐助请作者喝杯咖啡也是非常感谢
### Stars 趋势图
#### Gitee
[![Stargazers over time](https://whnb.wang/img/kekingcn/file-online-preview)](https://whnb.wang/kekingcn/file-online-preview?e=86400)
### Stars
#### GitHub

174
README.md
View File

@@ -4,7 +4,7 @@
Document online preview project solution, built using the popular Spring Boot framework for easy setup and deployment. This versatile open source project provides basic support for a wide range of document formats, including:
1. Supports Office documents such as `doc`, `docx`, `xls`, `xlsx`, `xlsm`, `ppt`, `pptx`, `csv`, `tsv`, , `dotm`, `xlt`, `xltm`, `dot`, `xlam`, `dotx`, `xla,` ,`pages` etc.
1. Supports Office documents such as `doc`, `docx`, `xls`, `xlsx`, `xlsm`, `ppt`, `pptx`, `csv`, `tsv`, , `dotm`, `xlt`, `xltm`, `dot`, `xlam`, `dotx`, `xla,` ,`pages` ,`pptm` etc.
2. Supports domestic WPS Office documents such as `wps`, `dps`, `et` , `ett`, ` wpt`.
3. Supports OpenOffice, LibreOffice office documents such as `odt`, `ods`, `ots`, `odp`, `otp`, `six`, `ott`, `fodt` and `fods`.
4. Supports Visio flowchart files such as `vsd`, `vsdx`.
@@ -13,13 +13,13 @@ Document online preview project solution, built using the popular Spring Boot fr
7. Supports document formats like `pdf`, `ofd`, and `rtf`.
8. Supports software model files like `xmind`.
9. Support for `bpmn` workflow files.
10. Support for `eml` mail files
10. Support for `eml` , `msg` mail files
11. Support for `epub` book documents
12. Supports 3D model files like `obj`, `3ds`, `stl`, `ply`, `gltf`, `glb`, `off`, `3dm`, `fbx`, `dae`, `wrl`, `3mf`, `ifc`, `brep`, `step`, `iges`, `fcstd`, `bim`, etc.
13. Supports CAD model files such as `dwg`, `dxf`, `dwf` `iges` ,` igs`, `dwt` , `dng` , `ifc` , `dwfx` , `stl` , `cf2` , `plt`, etc.
14. Supports all plain text files such as `txt`, `xml` (rendering), `md` (rendering), `java`, `php`, `py`, `js`, `css`, etc.
15. Supports compressed packages such as `zip`, `rar`, `jar`, `tar`, `gzip`, `7z`, etc.
16. Supports image previewing (flip, zoom, mirror) of `jpg`, `jpeg`, `png`, `gif`, `bmp`, `ico`, `jfif`, `webp`, etc.
16. Supports image previewing (flip, zoom, mirror) of `jpg`, `jpeg`, `png`, `gif`, `bmp`, `ico`, `jfif`, `webp`, `heic`, ,`heif` etc.
17. Supports image information model files such as `tif` and `tiff`.
18. Supports image format files such as `tga`.
19. Supports vector image format files such as `svg`.
@@ -63,6 +63,174 @@ URL[https://file.kkview.cn](https://file.kkview.cn)
2. second stepRun the main method of `/server/src/main/java/cn/keking/ServerMain.java`. After starting,visit `http://localhost:8012/`.
## Change History
### Version 5.0 (January 20, 2026)
#### Optimizations
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
4. Enhanced svg parsing - Optimized SVG vector image rendering
5. Improved json parsing - Enhanced JSON file processing
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
#### New Features
1. msg email parsing - Added support for msg format email file preview
2. heic image parsing - Added support for HEIC format image preview
3. Cross-domain methods - Added cross-domain processing mechanism
4. Highlighting methods - Added text highlighting functionality
5. Pagination methods - Added document page control
6. AES encryption methods - Added AES encryption support
7. Basic authentication methods - Added Basic authentication mechanism
8. Key management methods - Added key management functionality
9. Anti-duplicate conversion - Added duplicate file conversion protection
10. Async waiting - Added asynchronous processing mechanism
11. Upload restrictions - Added restrictions for unsupported file uploads
12. cadviewer conversion methods - Added CAD viewer conversion functionality
#### Fixed Issues
1. Compressed file path issues - Fixed internal path handling in compressed files
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
#### Updates
1. JDK version requirement - Mandatory requirement for JDK 21 or higher
2. pdf front-end parsing update - Upgraded PDF front-end rendering component
3. odf front-end parsing update - Upgraded ODF document front-end rendering
4. 3D model front-end parsing update - Upgraded 3D model viewer
5. pdf backend async conversion optimization - Implemented multi-threaded asynchronous conversion
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
### Version 4.4.0 (January 16, 2025)
#### New Features
1. xlsx printing support
2. Added GZIP compression enablement in configuration
3. CAD format now supports conversion to SVG and TIF formats, added timeout termination and thread management
4. Added captcha verification for file deletion
5. Added xbrl format preview support
6. PDF preview added control over signatures, drawings, illustration control, search positioning pagination, and display content definition
7. Added CSV format front-end parsing support
8. Added Docker image support for ARM64
9. Added Office preview conversion timeout property setting
10. Added preview file host blacklist mechanism
#### Optimizations
1. Optimized OFD mobile preview page adaptability
2. Updated xlsx front-end parsing component to accelerate parsing speed
3. Upgraded CAD component
4. Office function adjustments, supporting comments, conversion page limit, watermark generation, etc.
5. Upgraded markdown component
6. Upgraded dcm parsing component
7. Upgraded PDF.JS parsing component
8. Changed video player plugin to ckplayer
9. Smarter tif parsing, supporting modified image formats
10. Improved character encoding detection accuracy for large and small text files, handling concurrency vulnerabilities
11. Refactored file download code, added general file server authentication access design
12. Updated bootstrap component and streamlined unnecessary files
13. Updated epub version, optimized epub display effect
14. Fixed issue where scheduled cache cleanup only deleted disk cache files for multimedia file types
15. Auto-detection of installed Office components, added default paths for LibreOffice 7.5 & 7.6 versions
16. Changed drawio default to preview mode
17. Added PDF thread management, timeout management, memory cache management, updated PDF parsing component version
18. Optimized Dockerfile for true cross-platform image building
#### Fixes
1. Fixed forceUpdatedCache property setting issue where local cache files weren't updated
2. Fixed PDF decryption error after successful encrypted file conversion
3. Fixed BPMN cross-domain support issue
4. Fixed special character error in compressed package secondary reverse proxy
5. Fixed video cross-domain configuration causing video preview failure
6. Fixed TXT text pagination secondary loading issue
7. Fixed Drawio missing Base64 component issue
8. Fixed Markdown escaping issue
9. Fixed EPUB cross-domain error
10. Fixed URL special character issues
11. Fixed compressed package traversal vulnerability
12. Fixed compressed file path errors, image collection path errors, watermark issues, etc.
13. Fixed front-end parsing XLSX containing EMF format file errors
### Version 4.3.0 (July 5, 2023)
#### New Features
1. Added DCM medical digital imaging preview
2. Added drawio drawing preview
3. Added command to regenerate with cache enabled: &forceUpdatedCache=true
4. Added dwg CAD file preview
5. Added PDF file password support
6. Added DPI customization for PDF file image generation
7. Added configuration to delete converted OFFICE, CAD, TIFF, compressed package source files (enabled by default to save disk space)
8. Added front-end xlsx parsing method
9. Added support for pages, eps, iges, igs, dwt, dng, ifc, dwfx, stl, cf2, plt and other formats
#### Optimizations
1. Modified generated PDF file names to include file extensions to prevent duplicate names
2. Adjusted SQL file preview method
3. Optimized OFD preview compatibility
4. Beautified TXT text pagination box display
5. Upgraded Linux/Docker built-in office to LibreOffice-7.5.3
6. Upgraded Windows built-in office to LibreOffice-7.5.3 Portable
7. Other functional optimizations
#### Fixes
1. Fixed compressed package path errors in reverse proxy scenarios
2. Fixed .click error when image preview URLs contain &
3. Fixed known OFD preview issues
4. Fixed page error when clicking on file directories (tree nodes) in compressed package preview
5. Other known issue fixes
### Version 4.2.1 (April 18, 2023)
#### Change Log
1. Fixed null pointer bug in dwg file preview
### Version 4.2.0 (April 13, 2023)
#### New Features
1. Added SVG format file preview support
2. Added encrypted Office file preview support
3. Added encrypted zip, rar, and other compressed package file preview support
4. Added xmind software model file preview support
5. Added BPMN workflow model file preview support
6. Added eml email file preview support
7. Added EPUB e-book file preview support
8. Added office document format support: dotm, ett, xlt, xltm, wpt, dot, xlam, xla, dotx, etc.
9. Added 3D model file support: obj, 3ds, stl, ply, gltf, glb, off, 3dm, fbx, dae, wrl, 3mf, ifc, brep, step, iges, fcstd, bim, etc.
10. Added configurable high-risk file upload restrictions (e.g., exe files)
11. Added configurable site filing information
12. Added password requirement for demo site file deletion
#### Optimizations
1. Added caching for text document preview
2. Beautified 404, 500 error pages
3. Optimized invoice and other OFD file preview seal rendering compatibility
4. Removed office-plugin module, using new jodconverter component
5. Optimized Excel file preview effect
6. Optimized CAD file preview effect
7. Updated xstream, junrar, pdfbox, and other dependency versions
8. Updated TIF to PDF conversion plugin, added conversion cache
9. Optimized demo page UI deployment
10. Compressed package file preview supports directories
#### Fixes
1. Fixed XSS issues in some interfaces
2. Fixed console printed demo address not following content-path configuration
3. Fixed OFD file preview cross-domain issues
4. Fixed internal self-signed certificate HTTPS URL file download issues
5. Fixed special character file deletion issues
6. Fixed OOM caused by unreclaimed memory in PDF to image conversion
7. Fixed garbled preview for xlsx 7.4+ version files
8. Fixed TrustHostFilter not intercepting cross-domain interfaces (security issue - upgrade required if using TrustHost)
9. Fixed compressed package file preview filename garbled issue on Linux systems
10. Fixed OFD file preview only displaying 10 pages
### Changelog
> December 14, 2022, version 4.1.0 released:

174
SECURITY_CONFIG.md Normal file
View File

@@ -0,0 +1,174 @@
# kkFileView 安全配置指南
## 重要安全更新
4.4.0 之后版本开始kkFileView 增强了安全性默认拒绝所有未配置的外部文件预览请求以防止 SSRF服务器端请求伪造攻击
## 🔒 安全配置说明
### 1. 信任主机白名单配置推荐
`application.properties` 中配置允许预览的域名
```properties
# 方式1通过配置文件
trust.host = kkview.cn,yourdomain.com,cdn.example.com
# 方式2通过环境变量
KK_TRUST_HOST=kkview.cn,yourdomain.com,cdn.example.com
```
**示例场景**
- 只允许预览来自 `oss.aliyuncs.com` `cdn.example.com` 的文件
```properties
trust.host = oss.aliyuncs.com,cdn.example.com
```
### 2. 允许所有主机不推荐仅测试环境
```properties
trust.host = *
```
**警告**此配置会允许访问任意外部地址存在安全风险仅应在测试环境使用
### 3. 黑名单配置高级
禁止特定域名或内网地址
```properties
# 禁止访问内网地址强烈推荐
not.trust.host = localhost,127.0.0.1,192.168.*,10.*,172.16.*,169.254.*
# 禁止特定恶意域名
not.trust.host = malicious-site.com,spam-domain.net
```
**优先级**黑名单 > 白名单
### 4. Docker 环境配置
```bash
docker run -d \
-e KK_TRUST_HOST=yourdomain.com,cdn.example.com \
-e KK_NOT_TRUST_HOST=localhost,127.0.0.1 \
-p 8012:8012 \
keking/kkfileview:4.4.0
```
## 🛡 安全最佳实践
### 推荐配置
```properties
# 1. 明确配置信任主机白名单
trust.host = your-cdn.com,your-storage.com
# 2. 配置黑名单防止内网访问
not.trust.host = localhost,127.0.0.1,192.168.*,10.*,172.16.*
# 3. 禁用文件上传生产环境
file.upload.disable = true
# 4. 配置基础URL使用反向代理时
base.url = https://preview.yourdomain.com
```
### 不推荐配置
```properties
# 危险允许所有主机访问
trust.host = *
# 危险启用文件上传生产环境
file.upload.disable = false
```
## 🔍 配置验证
### 测试白名单是否生效
1. 配置白名单
```properties
trust.host = kkview.cn
```
2. 尝试预览白名单内的文件
```
http://localhost:8012/onlinePreview?url=https://kkview.cn/test.pdf
应该可以正常预览
```
3. 尝试预览白名单外的文件
```
http://localhost:8012/onlinePreview?url=https://other-domain.com/test.pdf
应该被拒绝显示"不信任的文件源"
```
### 测试黑名单是否生效
1. 配置黑名单
```properties
not.trust.host = localhost,127.0.0.1
```
2. 尝试访问本地文件
```
http://localhost:8012/getCorsFile?urlPath=http://127.0.0.1:8080/admin
应该被拒绝
```
## 📋 常见问题
### Q1: 升级后无法预览文件了
**原因**新版本默认拒绝未配置的主机
**解决**在配置文件中添加信任主机列表
```properties
trust.host = your-file-server.com
```
### Q2: 如何临时恢复旧版本行为
**不推荐**但如果确实需要
```properties
trust.host = *
```
### Q3: 配置了白名单但还是无法访问
检查以下几点
1. 域名是否完全匹配区分大小写
2. 是否配置了黑名单黑名单优先级更高
3. 查看日志中的 WARNING 信息
4. 确认环境变量是否正确设置
### Q4: 如何允许子域名
已支持通配符域名匹配可使用 `*.example.com`
```properties
trust.host = *.example.com
```
说明
- `*.example.com` 会匹配 `cdn.example.com``api.internal.example.com`但不匹配根域 `example.com`
- 对于 IP 风格通配 `192.168.*``10.*`仅匹配字面量 IPv4 地址不匹配域名
## 🚨 安全事件响应
如果发现可疑的预览请求
1. 检查日志文件搜索 "拒绝访问主机" 关键字
2. 确认 `trust.host` 配置是否合理
3. 检查是否有异常的网络请求
4. 如发现攻击行为及时更新黑名单配置
## 📞 获取帮助
- GitHub Issues: https://github.com/kekingcn/kkFileView/issues
- Gitee Issues: https://gitee.com/kekingcn/file-online-preview/issues
---
**安全提示**定期检查和更新信任主机列表遵循最小权限原则

57
doc/ci-auto-deploy.md Normal file
View File

@@ -0,0 +1,57 @@
# kkFileView master 自动部署
当前线上 Windows 服务器的实际部署信息如下
- 部署根目录`C:\kkFileView-5.0`
- 运行 jar`C:\kkFileView-5.0\bin\kkFileView-5.0.jar`
- 启动脚本`C:\kkFileView-5.0\bin\startup.bat`
- 运行配置`C:\kkFileView-5.0\config\test.properties`
- 健康检查地址`http://127.0.0.1:8012/`
当前自动部署链路采用服务器拉最新源码并本机编译的方式
1. 通过 WinRM 连接 Windows 服务器
2. 在服务器上的源码目录执行 `git fetch/reset/clean`同步到 `origin/$KK_DEPLOY_BRANCH`默认 `master`
3. 使用服务器上的 JDK 21 Maven 执行 `mvn clean package -Dmaven.test.skip=true`
4. 备份线上 jar替换为新构建产物
5. 使用现有 `startup.bat` 重启并做健康检查
6. 如果健康检查失败则自动回滚旧 jar 并重新拉起
## 需要配置的 GitHub Secrets
- `KK_DEPLOY_HOST`
- `KK_DEPLOY_USERNAME`
- `KK_DEPLOY_PASSWORD`
以下部署参数当前由 workflow GitHub Secrets 读取如果未单独配置则使用脚本默认值
- `KK_DEPLOY_PORT=5985`
- `KK_DEPLOY_ROOT=C:\kkFileView-5.0`
- `KK_DEPLOY_HEALTH_URL=http://127.0.0.1:8012/`
下面这些非敏感参数可以通过 workflow env GitHub Variables 覆盖未配置时会使用默认值
- `KK_DEPLOY_REPO_URL=https://github.com/kekingcn/kkFileView.git`
- `KK_DEPLOY_BRANCH=master`
- `KK_DEPLOY_SOURCE_ROOT=C:\kkFileView-source`
- `KK_DEPLOY_JAVA_HOME=C:\Program Files\jdk-21.0.2`
- `KK_DEPLOY_GIT_EXE=C:\kkFileView-tools\git\cmd\git.exe`
- `KK_DEPLOY_MVN_CMD=C:\kkFileView-tools\maven\bin\mvn.cmd`
- `KK_DEPLOY_MAVEN_SETTINGS=`
如果服务器到 GitHub 的拉取速度不稳定也可以把 `KK_DEPLOY_REPO_URL` 改成你自己的 Git 镜像地址
如果服务器访问 Maven Central 不稳定也可以通过 `KK_DEPLOY_MAVEN_SETTINGS` 指向自定义 `settings.xml`切换到就近镜像仓库
## 服务器前置环境
服务器需要具备以下工具
- Git for Windows推荐安装在 `C:\kkFileView-tools\git`
- Apache Maven 3.9.x推荐安装在 `C:\kkFileView-tools\maven`
- JDK 21当前线上已存在`C:\Program Files\jdk-21.0.2`
## Workflow
新增 workflow`.github/workflows/master-auto-deploy.yml`
- 触发条件`push` `master`或手动 `workflow_dispatch`
- 部署方式WinRM + 服务器源码同步 + 服务器本机 Maven 编译 + jar 替换/回滚

View File

@@ -0,0 +1,44 @@
# E2E 完善清单基于 PR342 回归经验
## 背景
本次手工回归已经验证了以下关键链路
- TXT
- XLSX
- ZIP
- PDF
- DOCX
- MP4
- CAD / DXF
但当前 GitHub CI 自动化 E2E 仅覆盖了其中一部分且大多只断言 HTTP 200没有校验最终预览效果
## 本次落地目标
### 1. 补齐缺失的关键链路
- [x] PDF 预览 smoke
- [x] MP4 预览 smoke
- [x] CAD / DXF 预览 smoke
### 2. 升级断言方式
- [x] 不再只看 `status === 200`
- [x] 增加标题/页面关键字断言确认命中了正确预览模板
- [x] PDF / DOCX / CAD 增加等待页 -> 最终页面的轮询兼容
### 3. 补齐 CI 所需 fixture
- [x] `sample.pdf` 进入 required fixture 清单
- [x] `sample.mp4` 进入 required fixture 清单
- [x] `text.dxf` 进入 required fixture 清单
- [x] MP4 DXF fixture 作为仓库内静态样例纳入 CI
### 4. 后续可继续增强本次未全部落地
- [ ] PDF / Office / CAD 增加截图型 nightly artifact
- [ ] `/picturesPreview` 增加独立 smoke
- [ ] OFD 增加稳定 fixture smoke case
- [ ] 为媒体预览增加更多格式 wav / mp3 / mov
- [ ] CAD 增加第二份标准样例避免单样例偏差
- [ ] 将当前 HTML 测试报告模板收敛成 nightly 自动产物
## 预期收益
- CI 覆盖这次 PR342 真正验证过的关键主链路
- 避免未来出现CI 绿了 PDF / MP4 / CAD 实际挂了的情况
- E2E 更接近用户真实感知而不是仅验证接口可达

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 219 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 320 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 187 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 254 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 392 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 211 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 469 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 252 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 236 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

View File

@@ -0,0 +1,28 @@
FROM ubuntu:24.04
RUN sed -i 's@//.*archive.ubuntu.com@//mirrors.aliyun.com@g' /etc/apt/sources.list.d/ubuntu.sources &&\
sed -i 's@//security.ubuntu.com@//mirrors.aliyun.com@g' /etc/apt/sources.list.d/ubuntu.sources &&\
sed -i 's@//ports.ubuntu.com@//mirrors.aliyun.com@g' /etc/apt/sources.list.d/ubuntu.sources &&\
apt-get update &&\
export DEBIAN_FRONTEND=noninteractive &&\
apt-get install -y --no-install-recommends openjdk-21-jre tzdata locales xfonts-utils fontconfig libreoffice-nogui &&\
echo 'Asia/Shanghai' > /etc/timezone &&\
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/*
# 内置一些常用的中文字体,避免普遍性乱码
ADD fonts/* /usr/share/fonts/chinese/
RUN cd /usr/share/fonts/chinese &&\
# 安装字体
mkfontscale &&\
mkfontdir &&\
fc-cache -fv
ENV LANG=zh_CN.UTF-8 LC_ALL=zh_CN.UTF-8

View File

@@ -0,0 +1,50 @@
# 构建说明
由于 kkfileview 的基础运行环境很少变动且制作耗时较久 kkfileview 本身代码开发会频繁改动因此把制作其 Docker 镜像的步骤拆分为两次
首先制作 kkfileview 的基础镜像kkfileview-base
然后使用 kkfileview-base 作为基础镜像进行构建加快 kkfileview docker 镜像构建与发布
执行如下命令即可构建基础镜像
> 这里镜像 tag 4.4.0 为例本项目所维护的 Dockerfile 文件考虑了跨平台兼容性 如果你需要用到 arm64 架构镜像, 则在arm64 架构机器上同样执行下面的构建命令即可
```shell
docker build --tag keking/kkfileview-base:4.4.0 .
```
## 跨平台构建
`docker buildx` 支持在一台机器上构建出多种平台架构的镜像推荐使用该能力进行跨平台的镜像构建
例如执行 `docker buildx build` 命令时加上 `--platform=linux/arm64` 参数即可构建出 arm64 架构镜像这极大方便了那些没有arm64 架构机器却想构建 arm64 架构镜像的用户
> 当前本项目仅支持构建 linux/amd64 linux/arm64 两种平台架构的镜像
> buildx builder driver 可以使用默认的 `docker` 类型, 若使用 `docker-container` 类型可以支持并行构建多种架构, 本文不再赘述, 有兴趣可以自行了解参考 [Docker Buildx | Docker Documentation](https://docs.docker.com/buildx/working-with-buildx/#build-multi-platform-images)
**前提要求**
以当前机器为 amd64 (x86_64)架构为例需要开启 docker buildx 特性以及开启 Linux QEMU 用户模式
> 使用 WSL2 Windows 用户如果安装了最新的 DockerDesktop, 则这些前提要求已满足, 无需额外下述设置
1. 安装 docker buildx 客户端插件
> docker 版本要求 >=19.03
若已安装, 则跳过详情参考 https://github.com/docker/buildx
2. 开启 QEMU 的用户模式功能, 并安装其它平台的模拟器:
> Linux 内核要求 >=4.8
使用 `tonistiigi/binfmt` 镜像可快速开启并安装模拟器执行下面命令:
```shell
docker run --privileged --rm tonistiigi/binfmt --install all
```
现在就可以愉快地开始构建了构建命令示例:
```shell
docker buildx build --platform=linux/amd64,linux/arm64 -t keking/kkfileview-base:4.4.0 --push .
```

View File

@@ -0,0 +1,53 @@
# Build Instructions
Since the base runtime environment for kkfileview rarely changes and takes a long time to build, while the kkfileview code itself is frequently updated, the process of building its Docker image is split into two steps:
First, create the base image for kkfileview (kkfileview-base).
Then, use kkfileview-base as the base image to build and speed up the kkfileview Docker image build and release process.
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.
```shell
docker build --tag keking/kkfileview-base:4.4.0 .
```
## Cross-Platform Build
`docker buildx` supports building images for multiple platform architectures on a single machine. It is recommended to use this capability for cross-platform image builds.
For example, adding the `--platform=linux/arm64` parameter when executing the `docker buildx build` command will allow you to build an arm64 architecture image. This is particularly convenient for users who want to build arm64 images but don't have an arm64 machine.
> Currently, this project only supports building images for the linux/amd64 and linux/arm64 architectures.
> The buildx builder driver can use the default `docker` type, but if you use the `docker-container` type, you can build multiple architectures in parallel. This README will not cover that in detail, you can learn more on your own. Refer to [Docker Buildx | Docker Documentation](https://docs.docker.com/buildx/working-with-buildx/#build-multi-platform-images)
**Prerequisites**
Assuming the current machine is amd64 (x86_64) architecture, you'll need to enable the docker buildx feature and enable Linux QEMU user mode:
> Windows users with WSL2 who have installed a recent version of Docker Desktop will already meet these prerequisites, so no additional setup is required.
1. Install the docker buildx client plugin:
> Docker version >=19.03 is required.
If it's already installed, you can skip this step. For more details, refer to https://github.com/docker/buildx.
2. Enable QEMU user mode and install emulators for other platforms:
> Linux kernel version >=4.8 is required.
You can quickly enable and install emulators using the tonistiigi/binfmt image by running the following command:
```shell
docker run --privileged --rm tonistiigi/binfmt --install all
```
Now you can enjoy the building. Heres an example build command:
```shell
docker buildx build --platform=linux/amd64,linux/arm64 -t keking/kkfileview-base:4.4.0 --push .
```

View File

@@ -1,38 +0,0 @@
FROM ubuntu:20.04
MAINTAINER chenjh "842761733@qq.com"
# 内置一些常用的中文字体,避免普遍性乱码
COPY fonts/* /usr/share/fonts/chinese/
RUN apt-get clean && apt-get update &&\
sed -i 's/http:\/\/archive.ubuntu.com/https:\/\/mirrors.aliyun.com/g' /etc/apt/sources.list &&\
sed -i 's/# deb/deb/g' /etc/apt/sources.list &&\
apt-get install -y --reinstall ca-certificates &&\
apt-get clean && apt-get update &&\
apt-get install -y locales language-pack-zh-hans &&\
localedef -i zh_CN -c -f UTF-8 -A /usr/share/locale/locale.alias zh_CN.UTF-8 && locale-gen zh_CN.UTF-8 &&\
export DEBIAN_FRONTEND=noninteractive &&\
apt-get install -y tzdata && ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime &&\
apt-get install -y fontconfig ttf-mscorefonts-installer ttf-wqy-microhei ttf-wqy-zenhei xfonts-wqy &&\
apt-get install -y wget &&\
cd /tmp &&\
wget https://kkview.cn/resource/server-jre-8u251-linux-x64.tar.gz &&\
tar -zxf /tmp/server-jre-8u251-linux-x64.tar.gz && mv /tmp/jdk1.8.0_251 /usr/local/ &&\
# 安装 libreoffice
apt-get install -y libxrender1 libxinerama1 libxt6 libxext-dev libfreetype6-dev libcairo2 libcups2 libx11-xcb1 libnss3 &&\
wget https://downloadarchive.documentfoundation.org/libreoffice/old/7.5.3.2/deb/x86_64/LibreOffice_7.5.3.2_Linux_x86-64_deb.tar.gz -cO libreoffice_deb.tar.gz &&\
tar -zxf /tmp/libreoffice_deb.tar.gz && cd /tmp/LibreOffice_7.5.3.2_Linux_x86-64_deb/DEBS &&\
dpkg -i *.deb &&\
# 清理临时文件
rm -rf /tmp/* && rm -rf /var/lib/apt/lists/* &&\
cd /usr/share/fonts/chinese &&\
mkfontscale &&\
mkfontdir &&\
fc-cache -fv
ENV JAVA_HOME /usr/local/jdk1.8.0_251
ENV CLASSPATH $JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
ENV PATH $PATH:$JAVA_HOME/bin
ENV LANG zh_CN.UTF-8
ENV LC_ALL zh_CN.UTF-8
CMD ["/bin/bash"]

View File

@@ -1,2 +0,0 @@
# 执行如下命令构建基础镜像加快kkfileview docker镜像构建与发布
docker build --tag keking/kkfileview-jdk:4.3.0 .

93
pom.xml
View File

@@ -6,51 +6,75 @@
<groupId>cn.keking</groupId>
<artifactId>kkFileView-parent</artifactId>
<version>4.4.0-SNAPSHOT</version>
<version>5.0</version>
<properties>
<java.version>1.8</java.version>
<jodconverter.version>4.4.6</jodconverter.version>
<spring.boot.version>2.4.2</spring.boot.version>
<poi.version>5.2.2</poi.version>
<xdocreport.version>1.0.6</xdocreport.version>
<xstream.version>1.4.20</xstream.version>
<junrar.version>7.5.4</junrar.version>
<redisson.version>3.2.0</redisson.version>
<sevenzipjbinding.version>16.02-2.01</sevenzipjbinding.version>
<jchardet.version>1.0</jchardet.version>
<antlr.version>2.7.7</antlr.version>
<concurrentlinkedhashmap.version>1.4.2</concurrentlinkedhashmap.version>
<rocksdb.version>5.17.2</rocksdb.version>
<pdfbox.version>2.0.27</pdfbox.version>
<jai-imageio.version>1.4.0</jai-imageio.version>
<jbig2-imageio.version>3.0.4</jbig2-imageio.version>
<galimatias.version>0.2.1</galimatias.version>
<bytedeco.version>1.5.2</bytedeco.version>
<opencv.version>4.1.2-1.5.2</opencv.version>
<openblas.version>0.3.6-1.5.1</openblas.version>
<ffmpeg.version>4.2.1-1.5.2</ffmpeg.version>
<itextpdf.version>5.5.13.3</itextpdf.version>
<httpclient.version>3.1</httpclient.version>
<aspose-cad.version>23.1</aspose-cad.version>
<bcprov-jdk15on.version>1.70</bcprov-jdk15on.version>
<commons-cli.version>1.2</commons-cli.version>
<commons-net.version>3.6</commons-net.version>
<commons-lang3.version>3.7</commons-lang3.version>
<!-- ========== Java 和编译配置 ========== -->
<java.version>21</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.release>${java.version}</maven.compiler.release>
<maven.compiler.target>${java.version}</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<!-- ========== Spring 框架 ========== -->
<spring.boot.version>3.5.6</spring.boot.version>
<!-- ========== 文档转换和Office处理 ========== -->
<jodconverter.version>4.4.11</jodconverter.version>
<poi.version>5.2.5</poi.version>
<xdocreport.version>1.0.6</xdocreport.version>
<aspose-cad.version>25.10</aspose-cad.version>
<!-- ========== PDF 处理 ========== -->
<pdfbox.version>3.0.6</pdfbox.version>
<!-- ========== 图像处理 ========== -->
<jai-imageio.version>1.4.0</jai-imageio.version>
<jbig2-imageio.version>3.0.4</jbig2-imageio.version>
<commons-imaging.version>1.0.0-alpha6</commons-imaging.version>
<!-- ========== 视频处理 (JavaCV) ========== -->
<bytedeco.version>1.5.12</bytedeco.version>
<opencv.version>4.11.0-1.5.12</opencv.version>
<openblas.version>0.3.30-1.5.12</openblas.version>
<ffmpeg.version>7.1.1-1.5.12</ffmpeg.version>
<!-- ========== 压缩文件处理 ========== -->
<sevenzipjbinding.version>16.02-2.01</sevenzipjbinding.version>
<junrar.version>7.5.5</junrar.version>
<!-- ========== 缓存和存储 ========== -->
<redisson.version>4.0.0</redisson.version>
<rocksdb.version>5.17.2</rocksdb.version>
<concurrentlinkedhashmap.version>1.4.2</concurrentlinkedhashmap.version>
<!-- ========== 网络通信 ========== -->
<httpcomponents.version>4.5.16</httpcomponents.version>
<commons-net.version>3.12.0</commons-net.version>
<!-- ========== Apache Commons 工具库 ========== -->
<commons-lang3.version>3.20.0</commons-lang3.version>
<commons-cli.version>1.11.0</commons-cli.version>
<!-- ========== 编码和字符处理 ========== -->
<juniversalchardet.version>1.0.3</juniversalchardet.version>
<jchardet.version>1.0</jchardet.version>
<!-- ========== 安全相关 ========== -->
<bcprov-jdk15on.version>1.70</bcprov-jdk15on.version>
<!-- ========== 其他工具库 ========== -->
<xstream.version>1.4.21</xstream.version>
<antlr.version>2.7.7</antlr.version>
<galimatias.version>0.2.1</galimatias.version>
</properties>
<modules>
<module>server</module>
</modules>
<!-- ========== 项目信息 ========== -->
<name>kkFileView-parent</name>
<description>专注文件在线预览服务</description>
<url>https://github.com/kekingcn/kkFileView</url>
@@ -86,5 +110,4 @@
<system>github</system>
<url>https://github.com/kekingcn/kkFileView/issues</url>
</issueManagement>
</project>
</project>

View File

@@ -6,7 +6,7 @@
<parent>
<artifactId>kkFileView-parent</artifactId>
<groupId>cn.keking</groupId>
<version>4.4.0-SNAPSHOT</version>
<version>5.0</version>
</parent>
<artifactId>kkFileView</artifactId>
@@ -24,44 +24,49 @@
</dependencyManagement>
<repositories>
<repository>
<id>aspose-maven-repository</id>
<url>https://repository.aspose.com/repo</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<!-- Aspose 仓库且只启用 releases -->
<repository>
<id>aspose-maven-repository</id>
<url>https://repository.aspose.com/repo</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<dependencies>
<!-- ========== Spring Boot 框架依赖 ========== -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-freemarker</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<!-- ========== 文档格式转换 ========== -->
<dependency>
<groupId>org.jodconverter</groupId>
<artifactId>jodconverter-local</artifactId>
<version>${jodconverter.version}</version>
</dependency>
<!-- web start -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jetty</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-freemarker</artifactId>
</dependency>
<!-- web end -->
<!-- poi start -->
<!-- ========== Office文档处理 (POI相关) ========== -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
@@ -98,9 +103,31 @@
<artifactId>fr.opensagres.xdocreport.document</artifactId>
<version>${xdocreport.version}</version>
</dependency>
<!-- poi start -->
<dependency>
<groupId>com.aspose</groupId>
<artifactId>aspose-cad</artifactId>
<version>${aspose-cad.version}</version>
</dependency>
<!-- rar5 的支持 和其他众多压缩支持 可参考 package net.sf.sevenzipjbinding.ArchiveFormat; -->
<!-- ========== PDF处理 ========== -->
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>pdfbox</artifactId>
<version>${pdfbox.version}</version>
<exclusions>
<exclusion>
<artifactId>commons-logging</artifactId>
<groupId>commons-logging</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>pdfbox-tools</artifactId>
<version>${pdfbox.version}</version>
</dependency>
<!-- ========== 压缩文件处理 ========== -->
<dependency>
<groupId>net.sf.sevenzipjbinding</groupId>
<artifactId>sevenzipjbinding</artifactId>
@@ -111,70 +138,13 @@
<artifactId>sevenzipjbinding-all-platforms</artifactId>
<version>${sevenzipjbinding.version}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>${commons-lang3.version}</version>
</dependency>
<dependency>
<groupId>org.redisson</groupId>
<artifactId>redisson</artifactId>
<version>${redisson.version}</version>
</dependency>
<!-- 解压(rar)-->
<dependency>
<groupId>com.github.junrar</groupId>
<artifactId>junrar</artifactId>
<version>${junrar.version}</version>
</dependency>
<dependency>
<groupId>net.sourceforge.jchardet</groupId>
<artifactId>jchardet</artifactId>
<version>${jchardet.version}</version>
</dependency>
<dependency>
<groupId>antlr</groupId>
<artifactId>antlr</artifactId>
<version>${antlr.version}</version>
</dependency>
<dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
<version>${commons-cli.version}</version>
</dependency>
<!-- FTP -->
<dependency>
<groupId>commons-net</groupId>
<artifactId>commons-net</artifactId>
<version>${commons-net.version}</version>
</dependency>
<dependency>
<groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
<version>${xstream.version}</version>
</dependency>
<dependency>
<groupId>com.googlecode.concurrentlinkedhashmap</groupId>
<artifactId>concurrentlinkedhashmap-lru</artifactId>
<version>${concurrentlinkedhashmap.version}</version>
</dependency>
<dependency>
<groupId>org.rocksdb</groupId>
<artifactId>rocksdbjni</artifactId>
<version>${rocksdb.version}</version>
</dependency>
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>pdfbox</artifactId>
<version>${pdfbox.version}</version>
</dependency>
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>pdfbox-tools</artifactId>
<version>${pdfbox.version}</version>
</dependency>
<!-- ========== 图像处理 ========== -->
<dependency>
<groupId>com.github.jai-imageio</groupId>
<artifactId>jai-imageio-jpeg2000</artifactId>
@@ -190,79 +160,12 @@
<artifactId>jbig2-imageio</artifactId>
<version>${jbig2-imageio.version}</version>
</dependency>
<dependency>
<groupId>com.aspose</groupId>
<artifactId>aspose-cad</artifactId>
<version>${aspose-cad.version}</version>
</dependency>
<!-- 密钥算法 -->
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>${bcprov-jdk15on.version}</version>
<groupId>org.apache.commons</groupId>
<artifactId>commons-imaging</artifactId>
<version>${commons-imaging.version}</version>
</dependency>
<!-- url 规范化 -->
<dependency>
<groupId>io.mola.galimatias</groupId>
<artifactId>galimatias</artifactId>
<version>${galimatias.version}</version>
</dependency>
<!-- 以下是bytedeco 基于opencv ffmpeg封装的javacv用于视频处理 -->
<dependency>
<groupId>org.bytedeco</groupId>
<artifactId>javacv</artifactId>
<version>${bytedeco.version}</version>
</dependency>
<dependency>
<groupId>org.bytedeco</groupId>
<artifactId>javacpp</artifactId>
<version>${bytedeco.version}</version>
</dependency>
<!-- 此版本中主要兼容linux和windows系统如需兼容其他系统平台请引入对应依赖即可 -->
<dependency>
<groupId>org.bytedeco</groupId>
<artifactId>opencv</artifactId>
<version>${opencv.version}</version>
<classifier>linux-x86_64</classifier>
</dependency>
<dependency>
<groupId>org.bytedeco</groupId>
<artifactId>opencv</artifactId>
<version>${opencv.version}</version>
<classifier>windows-x86_64</classifier>
</dependency>
<dependency>
<groupId>org.bytedeco</groupId>
<artifactId>openblas</artifactId>
<version>${openblas.version}</version>
<classifier>linux-x86_64</classifier>
</dependency>
<dependency>
<groupId>org.bytedeco</groupId>
<artifactId>openblas</artifactId>
<version>${openblas.version}</version>
<classifier>windows-x86_64</classifier>
</dependency>
<dependency>
<groupId>org.bytedeco</groupId>
<artifactId>ffmpeg</artifactId>
<version>${ffmpeg.version}</version>
<classifier>linux-x86_64</classifier>
</dependency>
<dependency>
<groupId>org.bytedeco</groupId>
<artifactId>ffmpeg</artifactId>
<version>${ffmpeg.version}</version>
<classifier>windows-x86_64</classifier>
</dependency>
<dependency>
<groupId>com.itextpdf</groupId>
<artifactId>itextpdf</artifactId>
<version>${itextpdf.version}</version>
</dependency>
<!-- JAI 系统依赖 -->
<dependency>
<groupId>javax.media</groupId>
<artifactId>jai_core</artifactId>
@@ -278,25 +181,134 @@
<systemPath>${pom.basedir}/lib/jai_codec-1.1.3.jar</systemPath>
</dependency>
<!-- test dependency - start -->
<!-- ========== 视频处理 (JavaCV) ========== -->
<dependency>
<groupId>org.bytedeco</groupId>
<artifactId>javacv</artifactId>
<version>${bytedeco.version}</version>
</dependency>
<dependency>
<groupId>org.bytedeco</groupId>
<artifactId>javacpp</artifactId>
<version>${bytedeco.version}</version>
</dependency>
<dependency>
<groupId>org.bytedeco</groupId>
<artifactId>opencv</artifactId>
<version>${opencv.version}</version>
<classifier>linux-x86_64</classifier>
</dependency>
<dependency>
<groupId>org.bytedeco</groupId>
<artifactId>opencv</artifactId>
<version>${opencv.version}</version>
<classifier>windows-x86_64</classifier>
</dependency>
<dependency>
<groupId>org.bytedeco</groupId>
<artifactId>openblas</artifactId>
<version>${openblas.version}</version>
<classifier>linux-x86_64</classifier>
</dependency>
<dependency>
<groupId>org.bytedeco</groupId>
<artifactId>openblas</artifactId>
<version>${openblas.version}</version>
<classifier>windows-x86_64</classifier>
</dependency>
<dependency>
<groupId>org.bytedeco</groupId>
<artifactId>ffmpeg</artifactId>
<version>${ffmpeg.version}</version>
<classifier>linux-x86_64</classifier>
</dependency>
<dependency>
<groupId>org.bytedeco</groupId>
<artifactId>ffmpeg</artifactId>
<version>${ffmpeg.version}</version>
<classifier>windows-x86_64</classifier>
</dependency>
<!-- ========== 网络通信 ========== -->
<dependency>
<groupId>org.apache.httpcomponents.client5</groupId>
<artifactId>httpclient5</artifactId>
</dependency>
<dependency>
<groupId>commons-net</groupId>
<artifactId>commons-net</artifactId>
<version>${commons-net.version}</version>
</dependency>
<!-- ========== 缓存和存储 ========== -->
<dependency>
<groupId>org.redisson</groupId>
<artifactId>redisson</artifactId>
<version>${redisson.version}</version>
</dependency>
<dependency>
<groupId>org.rocksdb</groupId>
<artifactId>rocksdbjni</artifactId>
<version>${rocksdb.version}</version>
</dependency>
<dependency>
<groupId>com.googlecode.concurrentlinkedhashmap</groupId>
<artifactId>concurrentlinkedhashmap-lru</artifactId>
<version>${concurrentlinkedhashmap.version}</version>
</dependency>
<!-- ========== 编码检测和字符处理 ========== -->
<dependency>
<groupId>com.googlecode.juniversalchardet</groupId>
<artifactId>juniversalchardet</artifactId>
<version>${juniversalchardet.version}</version>
</dependency>
<dependency>
<groupId>net.sourceforge.jchardet</groupId>
<artifactId>jchardet</artifactId>
<version>${jchardet.version}</version>
</dependency>
<!-- ========== Apache Commons 工具库 ========== -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>${commons-lang3.version}</version>
</dependency>
<dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
<version>${commons-cli.version}</version>
</dependency>
<!-- ========== 其他工具库 ========== -->
<dependency>
<groupId>antlr</groupId>
<artifactId>antlr</artifactId>
<version>${antlr.version}</version>
</dependency>
<dependency>
<groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
<version>${xstream.version}</version>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>${bcprov-jdk15on.version}</version>
</dependency>
<dependency>
<groupId>io.mola.galimatias</groupId>
<artifactId>galimatias</artifactId>
<version>${galimatias.version}</version>
</dependency>
<!-- ========== 测试依赖 ========== -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
<version>${httpclient.version}</version>
<scope>test</scope>
<exclusions>
<exclusion>
<artifactId>commons-logging</artifactId>
<groupId>commons-logging</groupId>
</exclusion>
</exclusions>
</dependency>
<!-- test dependency - end -->
</dependencies>
<build>
@@ -314,6 +326,14 @@
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<configuration>
<parameters>true</parameters>
</configuration>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
@@ -352,4 +372,4 @@
</plugin>
</plugins>
</build>
</project>
</project>

View File

@@ -3,7 +3,7 @@
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/2.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd">
<id>make-assembly</id>
<id>assembly-linux</id>
<formats>
<format>tar.gz</format>
</formats>

View File

@@ -3,7 +3,7 @@
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/2.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd">
<id>make-assembly</id>
<id>assembly-windows</id>
<formats>
<format>zip</format>
</formats>

16
server/src/main/bin/dev.sh Executable file
View File

@@ -0,0 +1,16 @@
#!/bin/bash
set -e
ROOT_DIR=$(cd "$(dirname "$0")/../../../.." || exit 1; pwd)
SERVER_DIR="$ROOT_DIR/server"
if [ -n "$JAVA_HOME" ]; then
export PATH="$JAVA_HOME/bin:$PATH"
fi
cd "$SERVER_DIR" || exit 1
mvn spring-boot:run \
-Dspring-boot.run.addResources=true \
-Dspring-boot.run.jvmArguments="-Dfile.encoding=UTF-8 -Dspring.config.location=$SERVER_DIR/src/main/config/application.properties"

Some files were not shown because too many files have changed in this diff Show More