devconcept / multer-gridfs-storage

🍃 GridFS storage engine for Multer to store uploaded files directly to MongoDb
MIT License
237 stars 67 forks source link

do you use file system underneath for stream files? #514

Closed alirezaRaisSattari closed 2 years ago

alirezaRaisSattari commented 2 years ago

do you use file system underneath for stream files? in stackoverflow everyone use file system for create stream file like: fs.createReadStream(uploadFilePath) do you use this too?

devconcept commented 2 years ago

No. These files are streamed directly to mongodb. If you want to stream twice you can use the default file storage and then use the standard mongodb streams or this module to pipe to the database depending on your needs. If you want a different order then use this module to store in the database and then use the standard mongodb streams to move from there to the filesystem