This code works but results in a filename that when downloaded, has url encodings in its name:
var input = (&s3.PutObjectInput{}).
SetBucket("io").
SetKey(filePath)
resp, _ := svc.PutObjectRequest(input)
urlStr, err := resp.Presign(15 * time.Minute)
This input:
var input = (&s3.PutObjectInput{}).
SetBucket("io").
SetKey(filePath).
SetContentDisposition("attachment; filename =\""+fileName+"\"")
results in this error message after the url is PUT
: There were headers present in the request which were not signed
when I try what's suggested here before signing my request:
resp, _ := svc.PutObjectRequest(input)
resp.HTTPRequest.Header.Add("ResponseContentDisposition:","attachment; filename =\""+fileName+"\"")
I get the same error. Do you know what I'm doing wrong or is there another way to specify the file name with a presigned url?