fix: 替换CDN前缀为minio配置

修复视频URL拼接时硬编码CDN地址的问题,改为从配置中动态读取minio前缀。
This commit is contained in:
2026-06-23 11:00:22 +08:00
parent 91a6436ad7
commit 36f9871deb
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -505,7 +505,7 @@ func VideoConcat(ctx context.Context, videoUrls []string) (r any, err error) {
}
func GetFileBytesFromURL(ctx context.Context, fileUrl string) ([]byte, error) {
newS := strings.ReplaceAll(fileUrl, "http://cdn.redpowerfuture.com", g.Cfg().MustGet(ctx, "minioPrefix").String())
newS := strings.ReplaceAll(fileUrl, g.Cfg().MustGet(ctx, "filePrefix").String(), g.Cfg().MustGet(ctx, "minioPrefix").String())
// 使用 GoFrame 客户端(自带超时、追踪、日志等能力)
resp, err := g.Client().Get(ctx, newS)
if err != nil {