fix: work around cloudflare r2 not conforming to s3 api standards
This commit is contained in:
parent
05cba6937f
commit
3442f7a518
|
@ -248,8 +248,9 @@ func (db *DB) WriteFlag(ctx context.Context, flagID xid.ID, flag *bytes.Buffer)
|
||||||
}
|
}
|
||||||
hash = hex.EncodeToString(hasher.Sum(nil))
|
hash = hex.EncodeToString(hasher.Sum(nil))
|
||||||
|
|
||||||
_, err = db.minio.PutObject(ctx, db.minioBucket, "/flags/"+hash+".webp", flag, -1, minio.PutObjectOptions{
|
_, err = db.minio.PutObject(ctx, db.minioBucket, "flags/"+hash+".webp", flag, -1, minio.PutObjectOptions{
|
||||||
ContentType: "image/webp",
|
ContentType: "image/webp",
|
||||||
|
SendContentMd5: true,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", errors.Wrap(err, "uploading flag")
|
return "", errors.Wrap(err, "uploading flag")
|
||||||
|
|
Loading…
Reference in New Issue