Search code examples
node.jsmongodbservergridfsfilepond

Where should be media files stored database or server?


I am trying to make video streaming platform (using MERN) so the question is where should I store videos, there are tutorials out there about file pond, grid Fs etc which encourage to store files in mongo DB and some say to store it in server. So I will be glad if anyone shed's light on these question what should we use and in which scenario to use a particular method?


Solution

  • Well it's recommended to store them on a file in your project (so when you deploy it will be in the server in your files) but it doesn't end there because to be able to know which photo /videos goes to which item you should make a database for them which will include the path of that image/video stored in your files and ref it with that item