Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I store images in mongodb with node.js?

I'm using the current application stack:

node.js, mongodb, express (for node.js), and mongoose (for node.js ... gives me orm capabilities)

I'm getting used to everything and have the regular CRUD stuff working. However, I can't figure out how to store binary/gridfs/BSON stuff in mongo and retrieve it.

Can someone give me an example using node.js/mongo/mongoose or know of a good one or know if its possible?

like image 218
Travis Avatar asked Sep 20 '25 16:09

Travis


1 Answers

According to Guillermo Rauch from the mongoose project, adding support to GridFS is not their priority right now (http://groups.google.com/group/mongoose-orm/browse_thread/thread/1bce50d90680d502)

Mentioned this here, so that somebody interested may pickup the task and hack GridFS support into mongoose.

like image 150
shashi Avatar answered Sep 22 '25 09:09

shashi