add uploadFile function

parent 70c7a813
......@@ -20,6 +20,9 @@ module.exports = function (gfs) {
},
getContestLogo : function(contestId) {
return dbUtils.readFileToBuffer(gfs, contestId.toString() + '/logo.png' );
},
uploadFile : function (path, name) {
return dbUtils.copyFileToGridFS(gfs, path, name);
}
};
};
\ 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