GridFile is a reusable Mongoose schema for MongoDB GridFS, enabling file upload/download directly through your Mongoose connection without separate GridFS setup. Current stable version is 1.1.6. It integrates with Mongoose models and supports streaming uploads and downloads. Differentiator: provides a clean Mongoose-based API for GridFS operations, unlike lower-level drivers or separate libraries.
npm install gridfileNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates connecting to MongoDB, creating a GridFile model, uploading a file stream, and downloading by ID.
Check documentation for any migration guide before upgrading.
Ensure mongoose.connect() is called before mongoose.model()