add readFile by id function

parent 0dd8849e
......@@ -23,6 +23,9 @@ module.exports = function (gfs) {
},
uploadFile : function (path, name) {
return dbUtils.copyFileToGridFS(gfs, path, name);
},
readFile : function (fileId) {
return dbUtils.readFileToBufferById(gfs, fileId);
}
};
};
\ No newline at end of file
{
"name": "mirera-db",
"version": "1.5.5",
"version": "1.5.6",
"description": "DB utils for mirera program testing server",
"main": "index.js",
"scripts": {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment