New API route to retrieve a screenshot

This commit is contained in:
Gaël Métais
2015-02-05 17:27:21 +01:00
parent 55dc387d3c
commit efa4151850
4 changed files with 114 additions and 7 deletions
@@ -106,6 +106,15 @@ function ResultsDatastore() {
return deferred;
}
this.getScreenshot = function(runId) {
var screenshotFilePath = path.join(resultsDir, runId, resultScreenshotName);
debug('Getting screenshot (runID = %s) from disk...', runId);
return Q.nfcall(fs.readFile, screenshotFilePath);
};
}
module.exports = ResultsDatastore;