You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
Describe the bug
PutObjectWithContext is error :SerializationError: failed to determine start of request body
Expected Behavior
succeed
Current Behavior
SerializationError: failed to determine start of request body\ncaused by: operation not supported
Reproduction Steps
config := &aws.Config{
Region: aws.String(os.Getenv("S3_REGION")),
Endpoint: aws.String(os.Getenv("S3_ENDPOINT")),
Credentials: credentials.NewStaticCredentials("user", "password", ""),
S3ForcePathStyle: aws.Bool(true), //virtual-host style方式,不要修改
}
session, err := session.NewSession(config)
if err != nil {
return nil, err
}
s3Client := s3.New(session)
if err != nil {
return nil, err
}
putObject, err := s3Client.PutObjectWithContext(context.Background(), &s3.PutObjectInput{
Body: file,
Bucket: aws.String(bucketName),
Key: aws.String(key),
})
Possible Solution
No response
Additional Information/Context
No response
SDK version used
v1.49.1
Environment details (Version of Go (
go version
)? OS name and version, etc.)go 1.20
The text was updated successfully, but these errors were encountered: