zfile-dev / zfile-dev/zfile

后台设置 - 显示设置 - 预览类型 中,把文件后缀都写了不存在的类型,但 doc 这类文件依旧还是会去调用 kkFileView 来打开。

Open
#811 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
10.8k
Forks
2k
PR merge metrics
No merged PRs in 30d

Description

环境信息

  • ZFile 版本:4.4.0
  • 涉及存储源:不涉及
  • 部署方式:Docker
  • 操作系统/设备:Linux
  • 浏览器/版本号:Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36 Edg/144.0.0.0

复现步骤

后台设置 - 显示设置 - 预览类型 中,把文件后缀都写了不存在的类型。

分享任一目录,目录中包含 docx 等 office 文件。

打开分享,docx 等文件点击后提示 加载预览失败:预览服务地址未配置。

按理,这些文件根本不应该再调用 kkFileView 来打开的。

预期结果

不能预览。

实际结果

由 kkFileView 来预览打开,并且报错。

加载预览失败:预览服务地址未配置。

额外信息

建议有开关彻底关闭分享链接中的预览。

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the 后台设置 - 显示设置 - 预览类型 setting and follow the sharing flow for docx files to the kkFileView preview call. Reproduce with unsupported extensions configured, then verify that these files are not sent to kkFileView and instead show the expected non-preview behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, java, spring-boot
Domain
full-stack
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.