add gridFS functions for contest logo

parent d80283cb
......@@ -8,6 +8,12 @@ module.exports = function (gfs) {
},
getCourseLogo : function(courseId) {
return dbUtils.readFileToBuffer(gfs, courseId.toString() + '/logo.png' );
},
saveContestLogo : function(path, contestId) {
return dbUtils.copyFileToGridFS(gfs, path, contestId.toString() + '/logo.png' );
},
getContestLogo : function(contestId) {
return dbUtils.readFileToBuffer(gfs, contestId.toString() + '/logo.png' );
}
};
}
\ No newline at end of file
};
\ No newline at end of file
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