Using node.js's File System functions from a browser

后端 未结 3 1830
广开言路
广开言路 2020-12-06 21:40

I want to create a function that removes a file from the server. I intend to use this function to restore settings (i.e. db files) to their default state. I run my server us

3条回答
  •  盖世英雄少女心
    2020-12-06 21:51

    You cannot use Node's fs in the browser and have it directly affect the file system on the server. fs is for use on locally available file systems only. You will need to create an API or use some other technique.

提交回复
热议问题