Add file upload to website and integrate into chat
Some checks failed
Deploy with Docker Compose / deploy (push) Has been cancelled
Some checks failed
Deploy with Docker Compose / deploy (push) Has been cancelled
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user