I upgraded my aws-sdk-go package to v1.7.7 from v1.4.x. I am using aws-sdk-go s3 client to connect to a blobstore. After upgrading, upload multipart file(i.e POST) to blobstore is not working. I am getting following error message: MalformedXML: The XML you provided was not well-formed or did not validate against our published schema. status code: 400 Following is the code snippet which was working in aws-sdk-go v1.4.x and is not working in v1.7.7.
uploader := s3manager.NewUploader(s.s)
svc := uploader.S3.(*s3.S3)
svc.Handlers.Sign.Clear()
svc.Handlers.Sign.PushBack(SignV2)
result, err := uploader.Upload(&s3manager.UploadInput{
Body: file,
Bucket: &s.bucketName,
Key: &fileName,
ContentType: &contentType,
})