Add file upload to website and integrate into chat
Some checks failed
Deploy with Docker Compose / deploy (push) Has been cancelled

This commit is contained in:
2026-03-09 13:47:38 +00:00
parent 77e2c272cb
commit 4c396ef30f
8 changed files with 69 additions and 1 deletions

View File

@@ -112,6 +112,7 @@ func main() {
// MESSAGES
r.GET("/ws", store.ConnectWebSocket)
r.POST("/messages/upload", store.UploadMessageFile)
// NOTES
r.GET("/notes/*path", store.GetNoteFile)

View File

@@ -31,6 +31,7 @@ type Message struct {
ID uint `gorm:"primarykey" json:"id"`
Content string `json:"text"`
AuthorID uint `json:"authorId"`
FileURL string `json:"fileUrl,omitempty"`
CreatedAt time.Time `json:"createdAt"`
DeletedAt gorm.DeletedAt `gorm:"index" json:"deletedAt"`
}