Answer the question
In order to leave comments, you need to log in
Database for chat on MongoDB - where to store pictures and other files?
I am writing a chat, MongoDB is used as a database.
The message entity can contain pictures and other types of files in addition to text.
What is the best way to store files? Store in the database only links to files, and the files themselves on a separate file server? Or store files using GridFS?
Answer the question
In order to leave comments, you need to log in
Files are best stored in the file system. A tangible bonus from storing the file in the FS is that you can give it directly to the web server (nginx, apach, etc), you don’t need to climb somewhere for this.
If it doesn't fit or you need some special features, then you can use GridFS or other tools.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question