I am building a web MERN stack application and wanted to know how to store files in MERN stack.By files I mean, .txt, .docx or images and videos. For images and videos I can use cloudinary, but I could not find any good hosting service for text and word files. I am asking users to either upload an image, a text( or word) file or a video, and I would like to hit the same endpoint in any of the cases to upload the files although hitting the same endpoint isn't a necessity, if there is some cloud service for text and word files which doesn't support media files, I can have 2 different endpoints to upload files to. I just want to know how and where can I upload text and word files I am using Mongodb Atlas.
Since you implemented Mongodb in your stack, why not saving files directly in Mongodb? Check GridFs Form files larger than 16mb: https://docs.mongodb.com/manual/core/gridfs/
You can use a third party service like AWS S3, you can install de AWS SDK on your node project and then you can use multer to upload files as buffer data end send it to your AWS S3 bucket with the SDK, the same aplies to other services like Firebase Firestorage and then you can save the returnerd url in your DB document.