Home > other >  where can i store user media files like image, video etc
where can i store user media files like image, video etc

Time:06-27

I making a social website with mern stack. I try, user media file in mongodb with base64 string but problem is that it is large.where can i store user media files like image, video etc.

CodePudding user response:

First of all, storing BLOB (image is one of them) in DB is a really bad practice and I'm glad people are noticing it as they go down the road.

A common practice is storing files in a file system and then storing the file path in the DB.

If you are using online services, then you may consider using an image CDN instead and storing the URL in the DB.

CodePudding user response:

I would recommend Cloudinary. Not only will you be able to store your videos but you’ll be able to manipulate and reduce the size of your assets without compromising on their quality.

  • Related