统一结果文件下载 URL 生成:历史记录/上传回包等漏网点改用 generateFreshDownloadUrl,result/ 前缀对象走 download 域名

This commit is contained in:
2026-08-26 03:58:29 -04:00
parent c9301b9250
commit 6e9988fd2c
5 changed files with 10 additions and 10 deletions
@@ -1593,8 +1593,8 @@ public class CollectDataService {
}
try {
// bucket 对 result/ 前缀已开放公开读,使用无签名公开 URL,避免签名 1 小时过期后下载 403。
// resolveObjectKey 兼容历史存量的旧格式(带签名的完整 URL),统一还原为纯 objectKey 再拼公开 URL。
return ossStorageService.getPublicUrl(ossStorageService.resolveObjectKey(resultFileUrl));
// result/ 前缀走 download-endpoint 独立下载域名(带宽/缓存分流),非 result/(如图片)仍走公开端点。
return ossStorageService.generateFreshDownloadUrl(resultFileUrl);
} catch (Exception ex) {
log.warn("[collect-data] build public download url failed resultId={} err={}",
row.getId(), ex.getMessage());