|
@@ -4,6 +4,8 @@ var Q = require('q');
|
|
var fs = require('fs');
|
|
var fs = require('fs');
|
|
var path = require('path');
|
|
var path = require('path');
|
|
|
|
|
|
|
|
+var serverSettings = require('../server_config/settings.json');
|
|
|
|
+
|
|
|
|
|
|
var screenshotHandler = function() {
|
|
var screenshotHandler = function() {
|
|
|
|
|
|
@@ -110,7 +112,6 @@ var screenshotHandler = function() {
|
|
|
|
|
|
// Chrome saves a temporary file on the disk, which is then removed.
|
|
// Chrome saves a temporary file on the disk, which is then removed.
|
|
// Its default folder is /tmp, but it can be changed in server_config/settings.json
|
|
// Its default folder is /tmp, but it can be changed in server_config/settings.json
|
|
- var serverSettings = require('../server_config/settings.json');
|
|
|
|
var tmpFolderPath = serverSettings.screenshotTempPath || '/tmp';
|
|
var tmpFolderPath = serverSettings.screenshotTempPath || '/tmp';
|
|
var tmpFileName = 'temp-chrome-screenshot.png';
|
|
var tmpFileName = 'temp-chrome-screenshot.png';
|
|
var tmpFileFullPath = path.join(tmpFolderPath, tmpFileName);
|
|
var tmpFileFullPath = path.join(tmpFolderPath, tmpFileName);
|