diff --git a/backend/db/avatars.go b/backend/db/avatars.go index 6d32394..f35ef26 100644 --- a/backend/db/avatars.go +++ b/backend/db/avatars.go @@ -80,7 +80,7 @@ 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{ + _, err = db.minio.PutObject(ctx, db.minioBucket, "users/"+userID.String()+"/"+hash+".webp", webp, -1, minio.PutObjectOptions{ ContentType: "image/webp", SendContentMd5: true, }) @@ -88,7 +88,7 @@ func (db *DB) WriteUserAvatar(ctx context.Context, return "", errors.Wrap(err, "uploading webp avatar") } - _, err = db.minio.PutObject(ctx, db.minioBucket, "/users/"+userID.String()+"/"+hash+".jpg", jpeg, -1, minio.PutObjectOptions{ + _, err = db.minio.PutObject(ctx, db.minioBucket, "users/"+userID.String()+"/"+hash+".jpg", jpeg, -1, minio.PutObjectOptions{ ContentType: "image/jpeg", SendContentMd5: true, })