后端
2.19.57- 脚本支持使用绝对路径读取本地文件
在此版本之前, 只能通过创建一个空内容的 Sub-Store 文件, 然后使用脚本读取
const fs = eval(`require("fs")`)
$content = fs.readFileSync('/tmp/1.txt', "utf8");新版本里可直接使用绝对路径. 注意不能跟原内部文件格式相同(
/api/file/xxx 或 /api/module/xxx )- ❤️2
2.19.57const fs = eval(`require("fs")`)
$content = fs.readFileSync('/tmp/1.txt', "utf8");/api/file/xxx 或 /api/module/xxx )