Saving Files to MongoDB GridFS with Node.JS

牧云@^-^@ 提交于 2019-12-23 02:57:09

问题


How do you put the close() in the writeBuffer callback?

This question relates to: Problem with MongoDB GridFS Saving Files with Node.JS


回答1:


A simple example is

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

Also check the docs for changes in behavior, writeBuffer was removed so just use write.

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



来源:https://stackoverflow.com/questions/10092282/saving-files-to-mongodb-gridfs-with-node-js

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!