add file.js for gridFS

parent d79f0158
module.exports = function (gfs) {
return {
saveCourseLogo : function(path, courseId) {
return dbUtils.saveFile(gfs, path, courseId.toString() + '/logo.png' );
},
getCourseLogo : function(courseId) {
return dbUtils.readFileToString(gfs, courseId.toString() + '/logo.png' );
}
};
}
\ No newline at end of file
......@@ -28,5 +28,7 @@ module.exports = function (uri) {
moduleExport(helper);
}
moduleExport(require('./file'));
return dbHelper;
}
\ No newline at end of file
......@@ -15,7 +15,7 @@
"db"
],
"dependencies": {
"db-utils": "git+https://git.niisi.ru/mirera/db-utils.git#7f2a23898a2d8447360bf067b3f638739ff10991"
"db-utils": "git+https://git.niisi.ru/mirera/db-utils.git#be9ad9f104056bd23763877252d020e18b708f04"
},
"author": "Danila Eremin",
"license": "MIT"
......
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