threadr.lostcave.ddnss.de/handlers
Joca 7b0528ef36
feat: Add file-based avatar system
- A new `files` table to store metadata about uploaded files, including original name and hash.
- The `users` table is updated to reference a `pfp_file_id` from the new `files` table, removing the insecure `pfp_url` field.
- A new `/file` endpoint and handler (`handlers/file.go`) are created to serve files securely based on their ID, preventing direct file system access.
- Profile editing (`handlers/profile_edit.go` and `templates/pages/profile_edit.html`) is updated to handle file uploads instead of URL inputs.
- The chat feature (`models/chat.go` and `templates/pages/chat.html`) is updated to work with the new file ID system, ensuring avatars are displayed correctly.
Should also fix #68.
2025-06-21 16:21:21 -03:00
..
about.go config: rename files to better hint at what they’re used for 2025-06-15 02:47:16 +02:00
accept_cookie.go Initial Commit 2025-06-15 02:37:02 +02:00
app.go feat: Add file-based avatar system 2025-06-21 16:21:21 -03:00
board.go Implemented features for creating and deleting boards and threads, removed thread types, enhanced CSS for boards and comments 2025-06-15 02:44:03 +02:00
boards.go Implemented features for creating and deleting boards and threads, removed thread types, enhanced CSS for boards and comments 2025-06-15 02:44:03 +02:00
chat.go Initial implementation of the chat feature. 2025-06-15 02:47:16 +02:00
file.go feat: Add file-based avatar system 2025-06-21 16:21:21 -03:00
home.go Fix cookie banner 2025-06-15 02:41:19 +02:00
like.go Initial Commit 2025-06-15 02:37:02 +02:00
login.go Initial implementation of the chat feature. 2025-06-15 02:47:16 +02:00
logout.go Initial Commit 2025-06-15 02:37:02 +02:00
news.go Create admin user, admin can edit news blotter 2025-06-15 02:41:36 +02:00
profile.go Initial Commit 2025-06-15 02:37:02 +02:00
profile_edit.go feat: Add file-based avatar system 2025-06-21 16:21:21 -03:00
signup.go Fix cookie banner 2025-06-15 02:41:19 +02:00
thread.go Implemented features for creating and deleting boards and threads, removed thread types, enhanced CSS for boards and comments 2025-06-15 02:44:03 +02:00
userhome.go Initial Commit 2025-06-15 02:37:02 +02:00