Cannot app.use(multer). “requires middleware function” error

前端 未结 7 1175
滥情空心
滥情空心 2020-11-29 06:23

I\'m just starting learning NodeJS and I am stuck with a problem. I would like to upload files to my server. To do so I searched and found out this module multer. Doing as t

7条回答
  •  夕颜
    夕颜 (楼主)
    2020-11-29 06:46

    Changing to app.use(multer({dest:'./uploads/'}).single('photo')); in the app.js works for me to start the server

提交回复
热议问题