mirror of
https://github.com/Tencent/WeKnora.git
synced 2025-11-25 03:15:00 +08:00
feat: Modify COS file service initialization parameters and URL processing logic
This commit is contained in:
@@ -216,7 +216,7 @@ func initFileService(cfg *config.Config) (interfaces.FileService, error) {
|
||||
false,
|
||||
)
|
||||
case "cos":
|
||||
if os.Getenv("COS_APP_ID") == "" ||
|
||||
if os.Getenv("COS_BUCKET_NAME") == "" ||
|
||||
os.Getenv("COS_REGION") == "" ||
|
||||
os.Getenv("COS_SECRET_ID") == "" ||
|
||||
os.Getenv("COS_SECRET_KEY") == "" ||
|
||||
@@ -224,7 +224,7 @@ func initFileService(cfg *config.Config) (interfaces.FileService, error) {
|
||||
return nil, fmt.Errorf("missing COS configuration")
|
||||
}
|
||||
return file.NewCosFileService(
|
||||
os.Getenv("COS_APP_ID"),
|
||||
os.Getenv("COS_BUCKET_NAME"),
|
||||
os.Getenv("COS_REGION"),
|
||||
os.Getenv("COS_SECRET_ID"),
|
||||
os.Getenv("COS_SECRET_KEY"),
|
||||
|
||||
Reference in New Issue
Block a user