fix: 替换CDN前缀为minio配置
修复视频URL拼接时硬编码CDN地址的问题,改为从配置中动态读取minio前缀。
This commit is contained in:
@@ -284,6 +284,7 @@ func VideoModelLambda(ctx context.Context, input any) (any, error) {
|
||||
}
|
||||
|
||||
urlPrefix, err := utils.GetFileAddressPrefix(ctx)
|
||||
newS := strings.ReplaceAll(urlPrefix, "http://cdn.redpowerfuture.com", g.Cfg().MustGet(ctx, "minioPrefix").String())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -299,7 +300,7 @@ func VideoModelLambda(ctx context.Context, input any) (any, error) {
|
||||
} else {
|
||||
outputRes = append(outputRes, node.NodeFormField{
|
||||
Field: fmt.Sprintf("concat_video_url:content:%d", 0),
|
||||
Value: urlPrefix + msg.FileURL,
|
||||
Value: newS + msg.FileURL,
|
||||
Label: fmt.Sprintf("concat_video_url:content:%d", 0),
|
||||
Type: "string",
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user