diff --git a/config.js b/config.js index 684dc1a..b217e50 100644 --- a/config.js +++ b/config.js @@ -37,7 +37,8 @@ const config = { // see https://github.com/expressjs/morgan // set to false to disable logging "accessLog": ':date[iso] :method :url :status :response-time :remote-addr', - "dynUpload": '/' + //use to set custom upload url + "uploadAppPath": '/' }; diff --git a/lib/endpoints.js b/lib/endpoints.js index 729f398..b4b03d4 100644 --- a/lib/endpoints.js +++ b/lib/endpoints.js @@ -44,13 +44,13 @@ app.get('/robots.txt', (req, res) => { // // app.get('/', (req, res) => { - if (config.dynUpload != '/') - res.status(304).redirect(config.dynUpload); + if (config.uploadAppPath != '/') + res.status(304).redirect(config.uploadAppPath); else res.sendFile(path.join(__dirname, '../public/html/upload.html')); }); -app.get(config.dynUpload, (req, res) => { +app.get(config.uploadAppPath, (req, res) => { res.sendFile(path.join(__dirname, '../public/html/upload.html')); });