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

前端 未结 7 1112
滥情空心
滥情空心 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 07:09

    I encountered the same problem. And I solved it. For the first problem, how to get the original file name? I printed the whole request and found we could get original name by using the path "req.file.originalname"

    and the other question, how to use "app.use()"?
    refers: here

    0 讨论(0)
提交回复
热议问题