You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
419 B
17 lines
419 B
3 years ago
|
const multer = require('multer');
|
||
|
|
||
|
const SERVER_PATHS = require('../lib/consts/SERVER_PATHS');
|
||
|
|
||
|
const storage = multer.diskStorage({
|
||
|
destination: (request, file, callback) => {
|
||
|
callback(null, SERVER_PATHS.mnt.shared.incoming.self);
|
||
|
},
|
||
|
filename: (request, file, callback) => {
|
||
|
callback(null, file.originalname);
|
||
|
},
|
||
|
});
|
||
|
|
||
|
const uploadSharedFiles = multer({ storage });
|
||
|
|
||
|
module.exports = uploadSharedFiles;
|