ENOENT: no such file or directory .?

后端 未结 14 1596
梦谈多话
梦谈多话 2020-12-09 17:15

This is error which am getting while post data and file. I have followed \'academind\' tutorial for building Restful API services, also i have been searching answer for this

14条回答
  •  北荒
    北荒 (楼主)
    2020-12-09 17:41

    So the answer is in the tutorials comments section on youtube. Instead of:

    cb(null, new Date().toISOString() + file.originalname);
    

    do:

    cb(null, Date.now() + file.originalname);
    

    Simple as.

提交回复
热议问题