这是代码const Koa = require('koa');const route = require('koa-route');const multer = require('koa-multer');const serve = require('koa-static'); const app = new Koa();app.use(serve(__dirname + '/koa-upload/'));const upload = multer({ dest: 'uploads/' }); app.use(route.post('/profile', upload.single('avatar'), async function(ctx) { console.log(123)})); app.listen(3000);console.log('listening on port 3000');图片是可以上传到uploads文件夹里面,可是console.log(123)这句话就没没有执行,后面就没有办法拿到文件信息了呀求大佬搭救一把
添加回答
举报
0/150
提交
取消