Skip to content

Commit 7fad06c

Browse files
Adjust testPresignedPostPolicy to ensure that GetObject... (#1996)
* 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
1 parent 1f087a1 commit 7fad06c

6 files changed

+713
-69
lines changed

api-put-object-fan-out.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,10 @@ func (c *Client) PutObjectFanOut(ctx context.Context, bucket string, fanOutData
8585
policy.SetEncryption(fanOutReq.SSE)
8686

8787
// Set checksum headers if any.
88-
policy.SetChecksum(fanOutReq.Checksum)
88+
err := policy.SetChecksum(fanOutReq.Checksum)
89+
if err != nil {
90+
return nil, err
91+
}
8992

9093
url, formData, err := c.PresignedPostPolicy(ctx, policy)
9194
if err != nil {

0 commit comments

Comments
 (0)