WeKnora/internal/application/service/file
wizardchen f27a1e083c fix(im): prefer tenant ID from context, shorten presigned URL TTL
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.
2026-04-30 11:40:30 +08:00
..
cos.go refactor: simplify image handling in _resolve_images function 2026-03-03 22:23:23 +08:00
dummy.go feat: introduce WeKnora Lite edition with lightweight configuration and deployment 2026-03-02 21:21:49 +08:00
factory.go fix(im): rewrite private storage URLs to HTTP in IM channel replies 2026-04-30 11:40:30 +08:00
local.go fix(im): prefer tenant ID from context, shorten presigned URL TTL 2026-04-30 11:40:30 +08:00
local_test.go fix(im): prefer tenant ID from context, shorten presigned URL TTL 2026-04-30 11:40:30 +08:00
minio.go fix(storage): auto-detect content-type to resolve image rendering issues 2026-04-20 21:59:54 +08:00
oss.go fix(storage): auto-detect content-type to resolve image rendering issues 2026-04-20 21:59:54 +08:00
oss_test.go chore(deps): 更新并新增go.mod依赖项 2026-04-14 17:33:12 +08:00
s3.go fix(storage): auto-detect content-type to resolve image rendering issues 2026-04-20 21:59:54 +08:00
s3_test.go fix(storage): add S3 provider scheme support to frontend and backend allowlists 2026-03-30 16:57:27 +08:00
tos.go fix(storage): auto-detect content-type to resolve image rendering issues 2026-04-20 21:59:54 +08:00