使用Node.JS将文件保存到MongoDB GridFS

时间:2012-04-10 16:04:46

标签: node.js mongodb gridfs

如何将close()放在writeBuffer回调中?

这个问题涉及: Problem with MongoDB GridFS Saving Files with Node.JS

1 个答案:

答案 0 :(得分:2)

一个简单的例子是

https://github.com/mongodb/node-mongodb-native/blob/master/test/gridstore/grid_store_test.js#L97

同时检查文档中的行为更改,writeBuffer已删除,因此只需使用write。

http://mongodb.github.com/node-mongodb-native/