mongodb操作文件,主要是通过GridFS类.存储文件主要存放在fs中,其中的fs是数据库默认的.并且GridFS是直接与数据库打交道,与collection集合无关. =============== https://docs.mongodb.com/manual/core/gridfs/ When to Use GridFS In MongoDB, use GridFS for storing files larger than 16 MB. =======================…