Commit 07569212 authored by Bess严根旺's avatar Bess严根旺

修改

parent e64bc432
...@@ -45,21 +45,18 @@ type Conversion struct { ...@@ -45,21 +45,18 @@ type Conversion struct {
// GetBucket 获取bucket信息 // GetBucket 获取bucket信息
func (o *Conversion) GetBucket(isPrivate bool) string { func (o *Conversion) GetBucket(isPrivate bool) string {
config, iniErr := ini.Load("domain/conf/app.ini") /*config, iniErr := ini.Load("domain/conf/app.ini")
if iniErr != nil { if iniErr != nil {
fmt.Println("Fail to read file")
log.Error("Fail to read file: %v") log.Error("Fail to read file: %v")
os.Exit(1) os.Exit(1)
} }
bucketPrivate := config.Section("AliYun").Key("bucketPrivate").String() bucketPrivate := config.Section("AliYun").Key("bucketPrivate").String()
bucketPub := config.Section("AliYun").Key("bucketPub").String() bucketPub := config.Section("AliYun").Key("bucketPub").String()*/
fmt.Println(bucketPub)
if isPrivate { if isPrivate {
return "oss://" + bucketPrivate return "oss://" + "test-bucket-v1"
} }
return "oss://" + bucketPub return "oss://" + "test-bucket-v1-pub"
} }
type DoConversionRequest struct { type DoConversionRequest struct {
...@@ -121,8 +118,8 @@ func (o *Conversion) checkGetTaskParam(arg GetTaskRequest) error { ...@@ -121,8 +118,8 @@ func (o *Conversion) checkGetTaskParam(arg GetTaskRequest) error {
func NewConversion() *Conversion { func NewConversion() *Conversion {
config, iniErr := ini.Load("domain/conf/app.ini") config, iniErr := ini.Load("domain/conf/app.ini")
if iniErr != nil { if iniErr != nil {
fmt.Println("Fail to read file") fmt.Println("Fail to read file111")
log.Error("Fail to read file: %v") log.Error("Fail to read file111 : %v")
os.Exit(1) os.Exit(1)
} }
host := config.Section("AliYun").Key("host").String() host := config.Section("AliYun").Key("host").String()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment