aheckmann / gridfs-stream

Easily stream files to and from MongoDB
MIT License
615 stars 120 forks source link

May I insert some fields when using createWriteStream #70

Closed yukozh closed 9 years ago

yukozh commented 9 years ago

I want to put somethings when using createWriteStream Can I put other fields with filename?

var writestream = db.gfs.createWriteStream({
    filename: req.files.uploadImg.filename,
    blablabla: 12345
});
zentosNase commented 9 years ago

same here :(

kjunine commented 9 years ago

Use metadata field.

https://github.com/aheckmann/gridfs-stream#createwritestream http://mongodb.github.io/node-mongodb-native/1.4/api-generated/gridstore.html

Reggino commented 9 years ago

Thanks @kjunine