I want the benefits of GridFS but mainly storing files under 16MB I want the benefits of GridFS but mainly storing files under 16MB mongodb mongodb

I want the benefits of GridFS but mainly storing files under 16MB


Without further details, I'd start by suggesting you read the recommendations provided here.

Given that all of your documents won't fit within the maximum document size when stored as a BSON document as BinData, I'd recommend using the gridFS system for a consistent programming and data management experience (for developers and IT). Depending on how the files are consumed, you may be able to more efficiently stream the contents of the files to clients when they are stored in GridFS by reading and writing in chunks.


It is recomended to store files smaller than 16 MB within single document using use the BinData data type for binary data. So, what is the problem to store files that size is under 16MB within single document and use GridFS only for files that size is exceed 16MB.