mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 01:26:12 +02:00
lint: fix lint
This commit is contained in:
@@ -2,14 +2,15 @@
|
||||
|
||||
const multer = require('multer');
|
||||
const storage = multer.diskStorage({});
|
||||
const upload = multer({ storage,
|
||||
const upload = multer({
|
||||
storage,
|
||||
// from https://github.com/TriliumNext/Trilium/pull/3058/files
|
||||
fileFilter: (req, file, cb) => {
|
||||
// UTF-8 file names are not well decoded by multer/busboy, so we handle the conversion on our side.
|
||||
// See https://github.com/expressjs/multer/pull/1102.
|
||||
file.originalname = Buffer.from(file.originalname, 'latin1').toString('utf-8');
|
||||
cb(null, true);
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
module.exports = upload;
|
||||
|
||||
@@ -154,7 +154,7 @@ Auth.reloadRoutes = async function (params) {
|
||||
});
|
||||
});
|
||||
|
||||
const upload = require('../middleware/multer')
|
||||
const upload = require('../middleware/multer');
|
||||
const middlewares = [
|
||||
upload.any(),
|
||||
Auth.middleware.applyCSRF,
|
||||
|
||||
Reference in New Issue
Block a user