Skip to content

Commit

Permalink
Disable checksum header
Browse files Browse the repository at this point in the history
  • Loading branch information
dbatbold committed Jul 11, 2024
1 parent 6678386 commit ec6de5d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions api-put-object-fan-out.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ func (c *Client) PutObjectFanOut(ctx context.Context, bucket string, fanOutData
policy.SetExpires(time.Now().UTC().Add(15 * time.Minute))

// Set encryption headers if any.
policy.SetEncryption(fanOutReq.SSE)
//policy.SetEncryption(fanOutReq.SSE)

// Set checksum headers if any.
policy.SetChecksum(fanOutReq.Checksum)
//policy.SetChecksum(fanOutReq.Checksum)

url, formData, err := c.PresignedPostPolicy(ctx, policy)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion post-policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ func (p *PostPolicy) SetChecksum(c Checksum) {
if c.IsSet() {
// Disabled for Cloudflare R2
//p.formData[amzChecksumAlgo] = c.Type.String()
p.formData[c.Type.Key()] = c.Encoded()
//p.formData[c.Type.Key()] = c.Encoded()
}
}

Expand Down

0 comments on commit ec6de5d

Please sign in to comment.