fix: 区分CDN与Minio内网地址配置

This commit is contained in:
2026-06-23 08:59:02 +08:00
parent 243c9e291f
commit e4bd08458a
2 changed files with 6 additions and 3 deletions
+5 -2
View File
@@ -64,5 +64,8 @@ consul:
jaeger:
addr: 192.168.0.83:4318
# 文件上传服务地址,与oss模块minio中的endpoint一致
filePrefix: "http://192.168.0.83:9000"
# 文件上传服务地址,cdn访问地址
filePrefix: "http://cdn.redpowerfuture.com"
# 文件上传服务地址,minio内网访问地址
minioPrefix: "http://192.168.0.83:9000"
+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, "filePrefix").String())
newS := strings.ReplaceAll(fileUrl, "http://cdn.redpowerfuture.com", g.Cfg().MustGet(ctx, "minioPrefix").String())
// 使用 GoFrame 客户端(自带超时、追踪、日志等能力)
resp, err := g.Client().Get(ctx, newS)
if err != nil {