From ad2d7a6991b00aca3e1e886253bd355f0f79786a Mon Sep 17 00:00:00 2001 From: Baris Usakli Date: Fri, 22 Mar 2019 15:15:23 -0400 Subject: [PATCH] fix: move upload_url to prestart so it is defined in upgrade scripts --- src/prestart.js | 1 + src/start.js | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/prestart.js b/src/prestart.js index cb077d1546..49f6336499 100644 --- a/src/prestart.js +++ b/src/prestart.js @@ -69,6 +69,7 @@ function loadConfig(configFile) { nconf.set('base_templates_path', path.join(nconf.get('themes_path'), 'nodebb-theme-persona/templates')); nconf.set('upload_path', path.resolve(nconf.get('base_dir'), nconf.get('upload_path'))); + nconf.set('upload_url', '/assets/uploads'); if (nconf.get('url')) { nconf.set('url_parsed', url.parse(nconf.get('url'))); diff --git a/src/start.js b/src/start.js index 53893d44b8..b2b4ceebc9 100644 --- a/src/start.js +++ b/src/start.js @@ -99,7 +99,6 @@ function setupConfigs() { nconf.set('use_port', !!urlObject.port); nconf.set('relative_path', relativePath); nconf.set('port', nconf.get('PORT') || nconf.get('port') || urlObject.port || (nconf.get('PORT_ENV_VAR') ? nconf.get(nconf.get('PORT_ENV_VAR')) : false) || 4567); - nconf.set('upload_url', '/assets/uploads'); } function printStartupInfo() {