fix: i missed one path

This commit is contained in:
Sam 2023-05-22 16:02:00 +02:00
parent bf34c77269
commit 23f79b0fec
No known key found for this signature in database
GPG Key ID: B4EF20DDE721CAA1
1 changed files with 2 additions and 2 deletions

View File

@ -80,7 +80,7 @@ func (db *DB) WriteUserAvatar(ctx context.Context,
} }
hash = hex.EncodeToString(hasher.Sum(nil)) 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", ContentType: "image/webp",
SendContentMd5: true, SendContentMd5: true,
}) })
@ -88,7 +88,7 @@ func (db *DB) WriteUserAvatar(ctx context.Context,
return "", errors.Wrap(err, "uploading webp avatar") 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", ContentType: "image/jpeg",
SendContentMd5: true, SendContentMd5: true,
}) })