|
|
@ -16,7 +16,6 @@ const book = new Book();
|
|
|
|
const uploadPath =
|
|
|
|
const uploadPath =
|
|
|
|
'./public/assets/images/user/' + moment().format('YYYY') + '/' + moment().format('MM');
|
|
|
|
'./public/assets/images/user/' + moment().format('YYYY') + '/' + moment().format('MM');
|
|
|
|
fs.ensureDir(uploadPath, () => {
|
|
|
|
fs.ensureDir(uploadPath, () => {
|
|
|
|
//console.log(err) // => null
|
|
|
|
|
|
|
|
// dir has now been created, including the directory it is to be placed in
|
|
|
|
// dir has now been created, including the directory it is to be placed in
|
|
|
|
});
|
|
|
|
});
|
|
|
|
var storage = multer.diskStorage({
|
|
|
|
var storage = multer.diskStorage({
|
|
|
|