refactor: use dataPath variable as given in file config (#1118)
* Actually use path variables as given in default config * Drop paths.content, avoid populating the global WIKI object
This commit is contained in:
committed by
Nicolas Giard
parent
5b36988d6d
commit
8000ebec8f
@@ -11,7 +11,7 @@ const sanitize = require('sanitize-filename')
|
||||
* Upload files
|
||||
*/
|
||||
router.post('/u', multer({
|
||||
dest: path.join(WIKI.ROOTPATH, 'data/uploads'),
|
||||
dest: path.resolve(WIKI.ROOTPATH, WIKI.config.dataPath, 'uploads'),
|
||||
limits: {
|
||||
fileSize: WIKI.config.uploads.maxFileSize,
|
||||
files: WIKI.config.uploads.maxFiles
|
||||
|
Reference in New Issue
Block a user