From 96222142c828ad6b4d03176707366864951008f6 Mon Sep 17 00:00:00 2001 From: jhc Date: Sun, 23 Feb 2025 09:34:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/dev/conf.ini | 2 +- pkg/service/upload/upload.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/dev/conf.ini b/docs/dev/conf.ini index ce6daae..91fcb02 100644 --- a/docs/dev/conf.ini +++ b/docs/dev/conf.ini @@ -33,4 +33,4 @@ TelNum = "18021272627" Password = "Gy.123456" [stripe] -Webhookkey = "we_1QuursAB1Vm8VfJquKmHQSVg" +Webhookkey = "whsec_5ru2Z9KsFixSvamAHgcvCBxufRTuHsyQ" diff --git a/pkg/service/upload/upload.go b/pkg/service/upload/upload.go index 7e198bd..cc0e2d8 100644 --- a/pkg/service/upload/upload.go +++ b/pkg/service/upload/upload.go @@ -279,7 +279,7 @@ func PutBos(filePath string, mediaType string, needRemove bool) (url string, err return } } - filePath = strings.Replace(filePath, "./runtime", "", 1) + filePath = strings.Replace(filePath, model.MediaPath, "", 1) var objectName string = fmt.Sprintf("%s/%s%s", config.ConfigData.Oss.BaseDir, config.Env, filePath) _, err = BOSClient.PutObjectFromBytes(config.ConfigData.Oss.BucketName, objectName, fileBytes) if err != nil {