← Back to Pull requests

fix(sharing): resolve missing base path for thumbnails in shared links #3194

Closed
unknown closed this pull request without merging on Oct 20, 2026 14:23 UTC
View on GitHub
unknown unknown commented on Oct 14, 2026 16:21 UTC
Author

以前 Local 驱动固定使用 /d 生成缩略图链接,因为这个地址需要真实挂载路径,但分享列表传入的是“分享 ID+子路径”,所以驱动仍然基于这些错误的数据拼接 /d,导致请求找不到对应存储并返回 500。而手动改成 /sd 能正常获取,是因为这个入口会校验分享并解析真实文件路径。这个在原始对于内部的 /d 入口上是不存在的。

这个PR 通过在上下文里面传入 ThumbnailBaseURLKey 让 local 驱动正确读取,追加文件名,生成默认的 /sd 链接。

这样修改以后,无须手动修改请求将 /d 改为 /sd 即可正确在 local 驱动渲染缩略图。

  • This PR has breaking changes.

  • / 此 PR 包含破坏性变更。
  • This PR changes public API, config, storage format, or migration behavior.

  • / 此 PR 修改了公开 API、配置、存储格式或迁移行为。
  • This PR requires corresponding changes in related repositories.

  • / 此 PR 需要关联仓库同步修改。

    Related repository PRs / 关联仓库 PR:

  • OpenList-Frontend:

  • OpenList-Docs:
  • Related Issues / 关联 Issue

    fix - https://github.com/OpenListTeam/OpenList/issues/3165

    Testing / 测试

  • go test ./...

  • Manual test / 手动测试:
  • 我在我的计算机上测试生成了本地存储的图片,并且通过浏览器打开连接,显示正常

    <img width="1304" height="416" alt="image" src="https://github.com/user-attachments/assets/c9edc3e5-1d06-427f-b3e1-82274f519bdc" />

    Checklist / 检查清单

  • I have read CONTRIBUTING.

  • / 我已阅读 CONTRIBUTING。
  • I confirm this contribution follows the repository license, contribution policy, and code of conduct.

  • / 我确认此贡献符合仓库许可证、贡献规范和行为准则。
  • I have formatted the changed code with gofmt, go fmt, or prettier where applicable.

  • / 我已按适用情况使用 gofmt、go fmt 或 prettier 格式化变更代码。
  • I have requested review from relevant maintainers or code owners where applicable.

  • / 我已在适用情况下请求相关维护者或代码所有者审查。

    AI Disclosure / AI 使用声明

  • This PR includes AI-assisted content.

  • / 此 PR 包含 AI 辅助内容。

    我使用了 kimi K3 查证了错误, ChatGPT 6 Asrta 编写修复代码,并进行测试。

    我已经审查所有 AI 代码并进行了适当的重构。

  • I have reviewed and validated all AI-assisted content included in this PR.

  • / 我已审核并验证此 PR 中的所有 AI 辅助内容。
  • I have ensured that all AI-assisted commits include Co-Authored-By attribution.

  • / 我已确保所有 AI 辅助提交都包含 Co-Authored-By 归属信息。
  • I can reproduce all AI-assisted content included in this PR without any AI tools.

  • / 我可以在没有任何 AI 工具的情况下重现此 PR 中包含的所有 AI 辅助内容。

    Diff: 270 lines (+202 / -68) across 3 files Reviewer: elysia-best Review duration: 8522m
    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
    0.39
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    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
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 39.4% (MEDIUM) · Higher = larger blast radius
    39.4%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 15.6% · Safe to merge
    15.6%