feat: 新增FAQ批量导入dry run功能

This commit is contained in:
wizardchen
2026-01-06 10:51:40 +08:00
parent a35999466c
commit 100484f13d
14 changed files with 869 additions and 6 deletions
+3 -1
View File
@@ -391,12 +391,14 @@ func initFileService(cfg *config.Config) (interfaces.FileService, error) {
os.Getenv("COS_PATH_PREFIX") == "" {
return nil, fmt.Errorf("missing COS configuration")
}
return file.NewCosFileService(
return file.NewCosFileServiceWithTempBucket(
os.Getenv("COS_BUCKET_NAME"),
os.Getenv("COS_REGION"),
os.Getenv("COS_SECRET_ID"),
os.Getenv("COS_SECRET_KEY"),
os.Getenv("COS_PATH_PREFIX"),
os.Getenv("COS_TEMP_BUCKET_NAME"), // 可选:临时桶名称(桶需配置生命周期规则自动过期)
os.Getenv("COS_TEMP_REGION"), // 可选:临时桶 region,默认与主桶相同
)
case "local":
return file.NewLocalFileService(os.Getenv("LOCAL_STORAGE_BASE_DIR")), nil