Fix #5416, uploads path config setting

- Finish moving uploads route to `/assets/uploads`
- Remove `upload_url` config setting, it was broken
This commit is contained in:
Peter Jaszkowiak
2017-02-08 11:41:24 -07:00
parent d43564dbbd
commit aaacdb8413
16 changed files with 79 additions and 58 deletions

View File

@@ -88,9 +88,6 @@ start.start = function () {
function setupConfigs() {
// nconf defaults, if not set in config
if (!nconf.get('upload_path')) {
nconf.set('upload_path', '/public/uploads');
}
if (!nconf.get('sessionKey')) {
nconf.set('sessionKey', 'express.sid');
}
@@ -102,7 +99,6 @@ function setupConfigs() {
nconf.set('use_port', !!urlObject.port);
nconf.set('relative_path', relativePath);
nconf.set('port', urlObject.port || nconf.get('port') || nconf.get('PORT') || (nconf.get('PORT_ENV_VAR') ? nconf.get(nconf.get('PORT_ENV_VAR')) : false) || 4567);
nconf.set('upload_url', nconf.get('upload_path').replace(/^\/public/, ''));
}
function printStartupInfo() {