Skip to content

Sdk v2 migration issue with s3 presigned put request #2053

Answered by maciejbak85
maciejbak85 asked this question in Q&A
Discussion options

You must be logged in to vote

ok nvm I found out:

func encodeCustomerKey(value []string) []string {
	str := strings.Join(value, "")
	strBytes := []byte(str)
	encoded := base64.StdEncoding.EncodeToString(strBytes)
	customeyKeySlice := []string{encoded}
	return customeyKeySlice
}

if key == "X-Amz-Server-Side-Encryption-Customer-Key" {
	signedHeaders["X-Amz-Server-Side-Encryption-Customer-Key"] = encodeCustomerKey(value)
}

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by RanVaknin
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant