Node.js, can't open files. Error: ENOENT, stat './path/to/file'

后端 未结 2 671
花落未央
花落未央 2020-11-28 20:21

I have developed a node.js program using the express framework on my computer, where it runs fine with no complaints.

However, when I run the program on my SUSE Stud

2条回答
  •  南方客
    南方客 (楼主)
    2020-11-28 21:08

    Here the code to use your app.js

    input specifies file name

    res.download(__dirname+'/'+input);
    

提交回复
热议问题