Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何将从 truevault 返回的 BLOB 对象转换/写入到 nodejs 服务器中的文件。
const data = (res.blob).toString('binary') const buf = new Buffer(data) fs.writeFileSync("out.js", buf)
当我运行它时,我在 out.js 文件中得到 [object Blob]。
TrueVault JS SDK 目前不支持从 Node.js 以这种方式访问 blob;读取 blob 内容的方法旨在用于 Web 应用程序。如果您需要从 Node.js 应用程序访问 blob 的内容,我建议您在他们的网站上发送功能请求。