Added getting stream for files

parent a966c2d6
......@@ -60,6 +60,10 @@ module.exports.getModelFunctions = (model, logger) => {
});
};
functions.getStream = id => {
return model.read({_id: id})
};
functions.read = async id => {
let fileInfo = await model.findOne({_id: id});
......
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