Added reading to stream

parent b2eb0b96
......@@ -4,7 +4,7 @@
"dependencies": {
"lodash": "latest",
"mongoose": "latest",
"mongoose-gridfs": "^0.5.0",
"mongoose-gridfs": "^1.2.4",
"random-js": "^1.0.8",
"string-to-stream": "^1.1.0",
"winston": "^2.3.1"
......
......@@ -78,6 +78,10 @@ module.exports.read = (fileId) => {
};
module.exports.readStream = (fileId) => {
return mongoose.solutionFiles.readById(fileId)
};
module.exports.fileInfo = (fileId) => {
return mongoose.solutionFiles.findOne({_id: fileId})
.catch(err => {
......
......@@ -74,6 +74,11 @@ module.exports.read = (fileId) => {
};
module.exports.readStream = (fileId) => {
return n mongoose.testingFiles.readById(fileId)
};
module.exports.fileInfo = (fileId) => {
return mongoose.testingFiles.findOne({_id: fileId})
.catch(err => {
......
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