fix(sharing): resolve missing base path for thumbnails in shared links #3194
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.39) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.39 · 270 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.335
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #3194"
general
weight: 0.35
elysia-best
以前 Local 驱动固定使用 /d 生成缩略图链接,因为这个地址需要真实挂载路径,但分享列表传入的是“分享 ID+子路径”,所以驱动仍然基于这些错误的数据拼接 /d,导致请求找不到对应存储并返回 500。而手动改成 /sd 能正常获取,是因为这个入口会校验分享并解析真实文件路径。这个在原始对于内部的 /d 入口上是不存在的。
这个PR 通过在上下文里面传入
ThumbnailBaseURLKey让 local 驱动正确读取,追加文件名,生成默认的 /sd 链接。这样修改以后,无须手动修改请求将 /d 改为 /sd 即可正确在 local 驱动渲染缩略图。
/ 此 PR 包含破坏性变更。
/ 此 PR 修改了公开 API、配置、存储格式或迁移行为。
/ 此 PR 需要关联仓库同步修改。
Related repository PRs / 关联仓库 PR:
Related Issues / 关联 Issue
fix - https://github.com/OpenListTeam/OpenList/issues/3165
Testing / 测试
go test ./...我在我的计算机上测试生成了本地存储的图片,并且通过浏览器打开连接,显示正常
<img width="1304" height="416" alt="image" src="https://github.com/user-attachments/assets/c9edc3e5-1d06-427f-b3e1-82274f519bdc" />
Checklist / 检查清单
/ 我已阅读 CONTRIBUTING。
/ 我确认此贡献符合仓库许可证、贡献规范和行为准则。
gofmt,go fmt, orprettierwhere applicable./ 我已按适用情况使用
gofmt、go fmt或prettier格式化变更代码。/ 我已在适用情况下请求相关维护者或代码所有者审查。
AI Disclosure / AI 使用声明
/ 此 PR 包含 AI 辅助内容。
我使用了 kimi K3 查证了错误, ChatGPT 6 Asrta 编写修复代码,并进行测试。
我已经审查所有 AI 代码并进行了适当的重构。
/ 我已审核并验证此 PR 中的所有 AI 辅助内容。
Co-Authored-Byattribution./ 我已确保所有 AI 辅助提交都包含
Co-Authored-By归属信息。/ 我可以在没有任何 AI 工具的情况下重现此 PR 中包含的所有 AI 辅助内容。