fix:upload设置

This commit is contained in:
momo 2023-10-26 15:03:54 +08:00
parent 094423042e
commit e892768dc3

View File

@ -57,15 +57,18 @@ 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")
default:
bucketName = basic.StorageBucketName
// 设置AWS会话的区域
upload.AwsSession.Config.Region = aws.String("us-west-1")
}
// 设置AWS会话的区域
upload.AwsSession.Config.Region = aws.String("us-west-1")
// 创建新的S3服务实例
svc := s3.New(upload.AwsSession)