hsun 1 年之前
父節點
當前提交
bed67e9403
共有 2 個文件被更改,包括 4 次插入0 次删除
  1. 2 0
      services/aws_s3.go
  2. 2 0
      utils/config.go

+ 2 - 0
services/aws_s3.go

@@ -48,6 +48,7 @@ type OssToken struct {
 	//Endpoint        string
 	Imghost      string
 	S3ForceStyle bool
+	S3Protocol   string
 }
 
 type S3Oss struct{}
@@ -124,5 +125,6 @@ func (m *S3Oss) GetUploadToken() (token OssToken, err error) {
 		hostStyle = false
 	}
 	token.S3ForceStyle = hostStyle
+	token.S3Protocol = utils.S3Protocol
 	return
 }

+ 2 - 0
utils/config.go

@@ -224,6 +224,7 @@ var (
 	S3Region          string
 	S3ForceStyle      string
 	S3EndpointPort    string
+	S3Protocol        string
 )
 
 func init() {
@@ -495,6 +496,7 @@ func init() {
 		S3Region = config["s3_region"]
 		S3ForceStyle = config["s3_force_style"]
 		S3EndpointPort = config["s3_endpoint_port"]
+		S3Protocol = config["s3_protocol"]
 	}
 
 	// 生成长图服务地址