mirror of
https://github.com/DRYTRIX/TimeTracker.git
synced 2026-04-25 05:59:15 -05:00
73c9316b77
- Add avatar_filename to User model with URL/path/existence helpers - Alembic migration 020: add users.avatar_filename (nullable) - Implement avatar upload in /profile/edit with Pillow validation - Add avatar removal endpoint: POST /profile/avatar/remove - Public serving route: /uploads/avatars/<filename> - Update templates: - Header shows user’s avatar if present - Profile page displays avatar - Edit Profile supports file upload and removal - Update Docker permission scripts to include uploads/avatars - Add tests for upload and removal (tests/test_profile_avatar.py) - Update README to mention profile pictures Security/UX: - Restrict types to PNG/JPG/JPEG/GIF/WEBP, verify content with Pillow - Unique filenames; old file removed on replacement - Respects MAX_CONTENT_LENGTH from config Migration: - Run: flask db upgrade - Ensure app/static/uploads/avatars is writable (use fix upload permission scripts if needed) No breaking changes.