mirror of
https://github.com/Tencent/WeKnora.git
synced 2026-09-19 10:28:49 +08:00
Addresses review feedback on the IM storage URL rewrite: - localFileService.GetFileURL now reads tenant ID from request context first, falling back to ParseTenantIDFromStoragePath only when context is absent. Fixes ambiguity for cloud providers whose paths embed numeric bucket/region names before the tenant segment, which could mint presigned URLs bound to the wrong tenant ID. - Shorten presigned URL default TTL from 24h to 2h. A leaked HMAC key authorizes cross-tenant file reads, so URLs should expire quickly; IM clients fetch referenced images within seconds anyway. - Document ParseTenantIDFromStoragePath as a best-effort fallback. - Add unit tests covering context-first, path-fallback, and the no-external-URL backward-compat path.