Browse Source

Add screenshot width setting

Gaël Métais 9 years ago
parent
commit
8bd3a1edde

+ 1 - 1
lib/server/controllers/apiController.js

@@ -96,7 +96,7 @@ var ApiController = function(app) {
             if (run.params.screenshot) {
                 
                 // Replace the empty promise created earlier with Q.resolve()
-                screenshotPromise = screenshot.toThumbnail(400)
+                screenshotPromise = screenshot.toThumbnail(serverSettings.screenshotWidth || 400)
                 
                     // Read screenshot
                     .then(function(screenshotBuffer) {

+ 1 - 0
server_config/settings-prod.json

@@ -2,6 +2,7 @@
     "serverPort": 80,
     "phantomasEngine": "webkit",
     "googleAnalyticsId": "",
+    "screenshotWidth": 400,
 
     "authorizedKeys": {
         

+ 1 - 0
server_config/settings.json

@@ -2,6 +2,7 @@
     "serverPort": 8383,
     "phantomasEngine": "webkit",
     "googleAnalyticsId": "",
+    "screenshotWidth": 400,
 
     "authorizedKeys": {