fix:upload设置
This commit is contained in:
parent
1e2ce0a18f
commit
1a034d7e9b
|
@ -11,12 +11,12 @@ import (
|
|||
)
|
||||
|
||||
// 全局的BucketName
|
||||
var StorageBucketName = aws.String("storage.fusenpack.com")
|
||||
var StorageBucketName = aws.String("fusenstorage")
|
||||
|
||||
// 全局的BucketName 缓存使用
|
||||
var TempfileBucketName = aws.String("tempfile.fusenpack.com")
|
||||
var TempfileBucketName = aws.String("fusentempfile")
|
||||
|
||||
var FusenLogoDbBucketName = aws.String("fusenlogodb")
|
||||
var FusenLogoDbBucketName = aws.String("fusenstorage")
|
||||
|
||||
const UploadFileLimitSize = 200 << 20
|
||||
|
||||
|
|
|
@ -57,17 +57,13 @@ func (upload *Upload) UploadFileByBase64(req *UploadBaseReq) (*UploadBaseRes, er
|
|||
switch req.UploadBucket {
|
||||
case 2:
|
||||
bucketName = basic.TempfileBucketName
|
||||
// 设置AWS会话的区域
|
||||
upload.AwsSession.Config.Region = aws.String("us-west-1")
|
||||
case 3:
|
||||
bucketName = basic.FusenLogoDbBucketName
|
||||
// 设置AWS会话的区域
|
||||
upload.AwsSession.Config.Region = aws.String("us-east-2")
|
||||
bucketName = basic.StorageBucketName
|
||||
default:
|
||||
bucketName = basic.StorageBucketName
|
||||
// 设置AWS会话的区域
|
||||
upload.AwsSession.Config.Region = aws.String("us-west-1")
|
||||
}
|
||||
// 设置AWS会话的区域
|
||||
upload.AwsSession.Config.Region = aws.String("us-east-2")
|
||||
|
||||
// 创建新的S3服务实例
|
||||
svc := s3.New(upload.AwsSession)
|
||||
|
@ -197,17 +193,13 @@ func (upload *Upload) UploadFileByByte(req *UploadBaseReq) (*UploadBaseRes, erro
|
|||
switch req.UploadBucket {
|
||||
case 2:
|
||||
bucketName = basic.TempfileBucketName
|
||||
// 设置AWS会话的区域
|
||||
upload.AwsSession.Config.Region = aws.String("us-west-1")
|
||||
case 3:
|
||||
bucketName = basic.FusenLogoDbBucketName
|
||||
// 设置AWS会话的区域
|
||||
upload.AwsSession.Config.Region = aws.String("us-east-2")
|
||||
bucketName = basic.StorageBucketName
|
||||
default:
|
||||
bucketName = basic.StorageBucketName
|
||||
// 设置AWS会话的区域
|
||||
upload.AwsSession.Config.Region = aws.String("us-west-1")
|
||||
}
|
||||
// 设置AWS会话的区域
|
||||
upload.AwsSession.Config.Region = aws.String("us-east-2")
|
||||
|
||||
// 创建新的S3服务实例
|
||||
svc := s3.New(upload.AwsSession)
|
||||
|
|
Loading…
Reference in New Issue
Block a user