Skip to content

Commit

Permalink
Adjust testPresignedPostPolicy to ensure that GetObject... (#1996)
Browse files Browse the repository at this point in the history
* Adjust testPresignedPostPolicy to ensure that GetObject returns the correct checksum. Add checksum headers to policy

* additional test for negative case, test coverage for policy, remove comment
  • Loading branch information
marktheunissen authored Nov 25, 2024
1 parent 1f087a1 commit 7fad06c
Show file tree
Hide file tree
Showing 6 changed files with 713 additions and 69 deletions.
5 changes: 4 additions & 1 deletion api-put-object-fan-out.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,10 @@ func (c *Client) PutObjectFanOut(ctx context.Context, bucket string, fanOutData
policy.SetEncryption(fanOutReq.SSE)

// Set checksum headers if any.
policy.SetChecksum(fanOutReq.Checksum)
err := policy.SetChecksum(fanOutReq.Checksum)
if err != nil {
return nil, err
}

url, formData, err := c.PresignedPostPolicy(ctx, policy)
if err != nil {
Expand Down
Loading

0 comments on commit 7fad06c

Please sign in to comment.