Merge pull request #62 from wardragon/dinupload
Change upload url to configurable
This commit is contained in:
2949
app/package-lock.json
generated
2949
app/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -36,7 +36,9 @@ 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',
|
||||
//use to set custom upload url
|
||||
"uploadAppPath": '/'
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -41,7 +41,16 @@ app.get('/robots.txt', (req, res) => {
|
||||
});
|
||||
|
||||
// Upload App
|
||||
//
|
||||
//
|
||||
app.get('/', (req, res) => {
|
||||
if (config.uploadAppPath != '/')
|
||||
res.status(304).redirect(config.uploadAppPath);
|
||||
else
|
||||
res.sendFile(path.join(__dirname, '../public/html/upload.html'));
|
||||
});
|
||||
|
||||
app.get(config.uploadAppPath, (req, res) => {
|
||||
res.sendFile(path.join(__dirname, '../public/html/upload.html'));
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user