Support for GridFS

1,249 views
Skip to first unread message

pfleidi

unread,
Jan 18, 2011, 4:03:13 PM1/18/11
to Mongoose Node.JS ORM
Hey,

I'm currently working on a project which uses node.js. MongoDB and
Mongoose to persist user data and picture metadata.

We are planning to move our pictures from the filesystem into mongo's
GridFS and would like to store them together with their metadata. The
mongodb-native driver already supports storing binary data and some
metadata in GridFS, but the interface is a bit ugly. I've put together
a snippet using Step and the mongodb-native driver to add picture to
GridFS: https://gist.github.com/747778

Are you planning to support GridFS within Mongoose? It would be great
to have an API which lets us create nice models for binary files and
their metadata similar to the "normal" model API of Mongoose.

And by the way: Keep up the awesome work, guys.

--
pfleidi

Guillermo Rauch

unread,
Jan 18, 2011, 4:49:04 PM1/18/11
to mongoo...@googlegroups.com
Pfleidi,

We've considered putting GridFS in our roadmap many times. Unfortunately, for our business needs we
decided to go with S3/Cloudfront for all our static highly-available persistent storage. 

I'd welcome patches, provided they:
  • are applied to the current development branch
  • include tests
  • provide an API consistent with the rest of mongoose (as far as error handling, promises, etc)
  • include the GridFS-related methods in the Collection interface and also the Collection at driver level (for -native). This is because drivers have been abstracted out, and I want to eventually replace -native.
If someone is interested in pursuing this endeavor, feel free to reach out through freenode @rauchg.
Thanks for your interest and feedback.

--
Guillermo Rauch
http://devthought.com
Reply all
Reply to author
Forward
0 new messages