fix: move upload_url to prestart so it is defined in upgrade scripts

This commit is contained in:
Baris Usakli
2019-03-22 15:15:23 -04:00
parent cead89f0ba
commit ad2d7a6991
2 changed files with 1 additions and 1 deletions

View File

@@ -69,6 +69,7 @@ function loadConfig(configFile) {
nconf.set('base_templates_path', path.join(nconf.get('themes_path'), 'nodebb-theme-persona/templates')); 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_path', path.resolve(nconf.get('base_dir'), nconf.get('upload_path')));
nconf.set('upload_url', '/assets/uploads');
if (nconf.get('url')) { if (nconf.get('url')) {
nconf.set('url_parsed', url.parse(nconf.get('url'))); nconf.set('url_parsed', url.parse(nconf.get('url')));

View File

@@ -99,7 +99,6 @@ function setupConfigs() {
nconf.set('use_port', !!urlObject.port); nconf.set('use_port', !!urlObject.port);
nconf.set('relative_path', relativePath); 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('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() { function printStartupInfo() {