From cc6d118193b31678e1e6c8fb043fe1a779e8aff4 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 6 Dec 2018 13:15:19 +0100 Subject: [PATCH] FIRST COMMIT: configurable upload url - aggiunta nel config.js della variabile dynUpload e modifica della url dell'app. --- config.js | 3 ++- lib/endpoints.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/config.js b/config.js index 07be49c..684dc1a 100644 --- a/config.js +++ b/config.js @@ -36,7 +36,8 @@ const config = { "mailTemplate": 'mailto:?subject=File Transfer&body=You can download the files here: %%URL%%', // see https://github.com/expressjs/morgan // set to false to disable logging - "accessLog": ':date[iso] :method :url :status :response-time :remote-addr' + "accessLog": ':date[iso] :method :url :status :response-time :remote-addr', + "dynUpload": '/' }; diff --git a/lib/endpoints.js b/lib/endpoints.js index 18cb476..d782427 100644 --- a/lib/endpoints.js +++ b/lib/endpoints.js @@ -41,7 +41,7 @@ app.get('/robots.txt', (req, res) => { }); // Upload App -app.get('/', (req, res) => { +app.get(config.dynUpload, (req, res) => { res.sendFile(path.join(__dirname, '../public/html/upload.html')); });