fix: work around cloudflare r2 not conforming to s3 api standards

This commit is contained in:
Sam 2023-05-29 04:10:08 +02:00
parent 05cba6937f
commit 3442f7a518
Signed by: sam
GPG key ID: B4EF20DDE721CAA1

View file

@ -248,8 +248,9 @@ func (db *DB) WriteFlag(ctx context.Context, flagID xid.ID, flag *bytes.Buffer)
}
hash = hex.EncodeToString(hasher.Sum(nil))
_, err = db.minio.PutObject(ctx, db.minioBucket, "/flags/"+hash+".webp", flag, -1, minio.PutObjectOptions{
ContentType: "image/webp",
_, err = db.minio.PutObject(ctx, db.minioBucket, "flags/"+hash+".webp", flag, -1, minio.PutObjectOptions{
ContentType: "image/webp",
SendContentMd5: true,
})
if err != nil {
return "", errors.Wrap(err, "uploading flag")