fix: resolve profile photo rendering and upload issues

This commit is contained in:
Gabriel Menezes 2026-10-08 10:22:41 -04:00
parent fa5d400a0d
commit b399992dc5
3 changed files with 10 additions and 4 deletions

View file

@ -39,9 +39,11 @@ services:
- "traefik.docker.network=proxy"
- "traefik.http.routers.minio.rule=Host(`minio-task2.beetech.dev`)"
- "traefik.http.routers.minio.entrypoints=web"
- "traefik.http.routers.minio.service=minio"
- "traefik.http.services.minio.loadbalancer.server.port=9000"
- "traefik.http.routers.minio-console.rule=Host(`console-task2.beetech.dev`)"
- "traefik.http.routers.minio-console.entrypoints=web"
- "traefik.http.routers.minio-console.service=minio-console"
- "traefik.http.services.minio-console.loadbalancer.server.port=9001"
minio-init:
@ -82,7 +84,7 @@ services:
MINIO_ACCESS_KEY: ${MINIO_ROOT_USER:-beetask123}
MINIO_SECRET_KEY: ${MINIO_ROOT_PASSWORD:-beetaskpassword}
MINIO_BUCKET: avatars
MINIO_PUBLIC_URL: http://localhost:9000
MINIO_PUBLIC_URL: ${MINIO_PUBLIC_URL:-http://localhost:9000}
depends_on:
postgres:
condition: service_healthy

View file

@ -397,10 +397,14 @@ export function AppShell() {
<div className="relative">
<button
onClick={() => setShowAvatarDropdown(!showAvatarDropdown)}
className="flex h-9 w-9 items-center justify-center rounded-full bg-brand/10 text-brand hover:bg-brand hover:text-white transition-all"
className="flex h-9 w-9 items-center justify-center rounded-full bg-brand/10 text-brand transition-all overflow-hidden border border-brand/20 hover:border-brand"
title={user?.name}
>
<User size={18} />
{user?.photo ? (
<img src={user.photo} alt={user.name} className="h-full w-full object-cover" />
) : (
<User size={18} />
)}
</button>
{showAvatarDropdown && (

View file

@ -122,7 +122,7 @@ export const ProfilePage: React.FC = () => {
<input
ref={fileInputRef}
type="file"
accept="image/*"
accept="image/jpeg, image/png, image/webp"
className="hidden"
onChange={handleFileChange}
/>