Commit 8af0becd authored by Bess严根旺's avatar Bess严根旺

必传字段

parent bb793871
...@@ -45,10 +45,21 @@ type Conversion struct { ...@@ -45,10 +45,21 @@ 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")
if iniErr != nil {
fmt.Println("Fail to read file")
log.Error("Fail to read file: %v")
os.Exit(1)
}
bucketPrivate := config.Section("AliYun").Key("bucketPrivate").String()
bucketPub := config.Section("AliYun").Key("bucketPub").String()
fmt.Println(bucketPub)
if isPrivate { if isPrivate {
return "oss://" + "test-bucket-v1" return "oss://" + bucketPrivate
} }
return "oss://" + "test-bucket-v1-pub" return "oss://" + bucketPub
} }
type DoConversionRequest struct { type DoConversionRequest struct {
......
...@@ -106,6 +106,7 @@ func (doc *DocServiceService) DoConversion(c context.Context, req *pb.DoConversi ...@@ -106,6 +106,7 @@ func (doc *DocServiceService) DoConversion(c context.Context, req *pb.DoConversi
SetTargetType(req.TargetType). SetTargetType(req.TargetType).
SetIsPrivate(int8(isPri)). SetIsPrivate(int8(isPri)).
SetTargetURL(request.TargetURI). SetTargetURL(request.TargetURI).
SetCallbackRes("").
Save(c) Save(c)
if errsInfo != nil { if errsInfo != nil {
......
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