I'm building a news website using MERN(mongodb,express,react,node), which basically will contain a lot of images and videos, and Now I'm confused on where I should store Images and videos.
I'm thinking about :
1- storing the Images and videos on a Folder on the server.( this idea I think it is not good because storing a lot of images in a single folder slow the loading of images)
2- use a third party like (aws s3)bucket.( I think this is the best choice)
I want someone who already built like these kind of websites to advice me on which path I should go.
CodePudding user response:
"What is the best way" - What is "best" will depend on who you ask.
The main reason I highly suggest you pick a third-party static hosting provider of your choice (S3, Cloudinary, etc) is because they take care of things like global availability, low latency, uptime, etc. If you self-manage, you need to handle/monitor these things yourself.