diff --git a/global/mkdir.js b/global/mkdir.js deleted file mode 100644 index fec2537..0000000 --- a/global/mkdir.js +++ /dev/null @@ -1,21 +0,0 @@ -const fs = require('fs'); -module.exports = async function mkdir(filePath) { - console.log(filePath); - if (await fs.existsSync(filePath)) { - console.log('该路径已存在'); - }else{ - console.log('该路径不存在'); - const dirCache={}; - filePath=filePath.replace(/\\/g,"/"); - console.log(filePath); - const arr=filePath.split('/'); - let dir=arr[0]; - for(let i=1;i{ - await mkdir(uploadPath); -})() -console.log(uploadPath); - -const filename = (req, file, cb) => { - console.log('filename'); - const name = UUID.v1(); - let type = file.originalname.split('.').reverse()[0]; - type = type ? `.${type}` : ''; - cb(null, `${name}${type}`); -} diff --git a/routes/index.js b/routes/index.js index a385708..f3eb2ad 100644 --- a/routes/index.js +++ b/routes/index.js @@ -3,7 +3,7 @@ const router = express.Router(); const styleRouter = require('./styles'); /* GET home page. */ router.get('/', function(req, res, next) { - res.render('index', { title: 'node-aoi' }); + res.render('index', { title: 'logistics-node' }); }); router.use('/styles', styleRouter);