diff --git a/backend/db/avatars.go b/backend/db/avatars.go index f90f5d4..27e41e7 100644 --- a/backend/db/avatars.go +++ b/backend/db/avatars.go @@ -81,14 +81,16 @@ func (db *DB) WriteUserAvatar(ctx context.Context, hash = hex.EncodeToString(hasher.Sum(nil)) _, err = db.minio.PutObject(ctx, db.minioBucket, "/users/"+userID.String()+"/"+hash+".webp", webp, -1, minio.PutObjectOptions{ - ContentType: "image/webp", + ContentType: "image/webp", + SendContentMd5: true, }) if err != nil { return "", errors.Wrap(err, "uploading webp avatar") } _, err = db.minio.PutObject(ctx, db.minioBucket, "/users/"+userID.String()+"/"+hash+".jpg", jpeg, -1, minio.PutObjectOptions{ - ContentType: "image/jpeg", + ContentType: "image/jpeg", + SendContentMd5: true, }) if err != nil { return "", errors.Wrap(err, "uploading jpeg avatar") @@ -110,14 +112,16 @@ func (db *DB) WriteMemberAvatar(ctx context.Context, hash = hex.EncodeToString(hasher.Sum(nil)) _, err = db.minio.PutObject(ctx, db.minioBucket, "/members/"+memberID.String()+"/"+hash+".webp", webp, -1, minio.PutObjectOptions{ - ContentType: "image/webp", + ContentType: "image/webp", + SendContentMd5: true, }) if err != nil { return "", errors.Wrap(err, "uploading webp avatar") } _, err = db.minio.PutObject(ctx, db.minioBucket, "/members/"+memberID.String()+"/"+hash+".jpg", jpeg, -1, minio.PutObjectOptions{ - ContentType: "image/jpeg", + ContentType: "image/jpeg", + SendContentMd5: true, }) if err != nil { return "", errors.Wrap(err, "uploading jpeg avatar") diff --git a/backend/db/export.go b/backend/db/export.go index 5c35552..7741a8d 100644 --- a/backend/db/export.go +++ b/backend/db/export.go @@ -67,7 +67,8 @@ func (db *DB) CreateExport(ctx context.Context, userID xid.ID, filename string, } _, err = db.minio.PutObject(ctx, db.minioBucket, de.Path(), file, int64(file.Len()), minio.PutObjectOptions{ - ContentType: "application/zip", + ContentType: "application/zip", + SendContentMd5: true, }) if err != nil { return de, errors.Wrap(err, "writing export file")