From aa7fb1c7ca0cfd8d960614defdbd65952e39cb2a Mon Sep 17 00:00:00 2001 From: yoge Date: Fri, 19 Dec 2025 17:06:38 +0800 Subject: [PATCH] feat: rm uname --- pkg/oss/policy.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/oss/policy.go b/pkg/oss/policy.go index 0cfc4b3..1ff0650 100644 --- a/pkg/oss/policy.go +++ b/pkg/oss/policy.go @@ -119,12 +119,16 @@ func GetPolicyURL(ctx context.Context, path string) (string, error) { // DownloadFile downloads a file from OSS and returns the reader, caller should close the reader func DownloadFile(ctx context.Context, ossPath string) (io.ReadCloser, error) { endpoint := config.GlobalConfig.Aliyun.OSS.InnerEndpoint + useCname := false if config.GlobalConfig.Server.IsDebug() { endpoint = config.GlobalConfig.Aliyun.OSS.Endpoint + useCname = true } + log.Info(ctx, "func", "DownloadFile", "msg", "endpoint", endpoint, "ossPath", ossPath) + // Create OSS client - client, err := oss.New(endpoint, config.GlobalConfig.Aliyun.OSS.AccessKeyID, config.GlobalConfig.Aliyun.OSS.AccessKeySecret, oss.UseCname(true)) + client, err := oss.New(endpoint, config.GlobalConfig.Aliyun.OSS.AccessKeyID, config.GlobalConfig.Aliyun.OSS.AccessKeySecret, oss.UseCname(useCname)) if err != nil { log.Error(ctx, "func", "DownloadFile", "msg", "create oss client failed", "error", err) return nil, err