feat: Lsky/COS gateway - attachments upload direct to object storage (remote_url/remote_thumb), preview loads from COS, graceful local fallback

This commit is contained in:
root
2026-10-17 01:16:59 +08:00
parent a94c1f6e25
commit 2bba3be08e
23 changed files with 174 additions and 51 deletions
@@ -64,6 +64,7 @@ export function RecordDetailDialog({ open, onClose, footprintId, onEdit }: {
for (const a of list) {
if (cancelled) return;
if (thumbCache.has(a.id)) { setImgMap(m => ({ ...m, [a.id]: thumbCache.get(a.id)! })); continue; }
if (a.remote_thumb) { thumbCache.set(a.id, a.remote_thumb); setImgMap(m => ({ ...m, [a.id]: a.remote_thumb! })); continue; }
try {
if (a.thumb_rel_path) {
// 新上传:服务端已存 480px WebP 缩略图,20KB 级,秒开