Node Multer unexpected field

后端 未结 11 1506
情歌与酒
情歌与酒 2020-12-12 12:17

I\'m working on uploading a file to my app using the multer npm module.

The multer function I have defined is to allow a single file uploaded to the file system. Ev

11条回答
  •  一整个雨季
    2020-12-12 13:18

    The you use in multer's upload.single() function must be the same as the one you use in .

    So you need to change

    var type = upload.single('file')

    to

    var type = upload.single('recfile')

    in you app.js

    Hope this helps.

提交回复
热议问题