fix(media): 对象存储 CDN - 统一资源预览与下载走 CDN

统一登录资源、公开画布分享和管理后台媒体的 CDN 预览与下载出口,并保留同源代理读取能力。
This commit is contained in:
MasterChiefCN
2026-08-16 13:07:50 +08:00
committed by GitHub
parent ee1e1fa2be
commit 9f182a2902
13 changed files with 296 additions and 28 deletions

View File

@@ -142,7 +142,7 @@ export function resourceFileUrl(id: string) {
function resourceProxyFileUrl(id: string) {
const base = String(apiBaseURL).replace(/\/+$/, "");
return `${base}/resources/${encodeURIComponent(id)}/file`;
return `${base}/resources/${encodeURIComponent(id)}/file?proxy=1`;
}
export async function resolveResourceUrl(storageKey?: string, fallback = "") {