fs.writeFile 无法写入 arrayBuffer
发布于 6 年前 作者 agu 6063 次浏览 来自 问答
  • 当前 Bug 的表现(可附上截图)
  • 预期表现
  • 复现路径
  • 提供一个最简复现 Demo

var file = wx.getFileSystemManager()

        file.writeFile({

          filePath: wx.env.USER_DATA_PATH + ‘/test/test.text’,

          data: new Uint16Array([97, 32, 72, 101, 108, 108, 111, 32, 119, 111, 114, 108, 100, 33]),

          complete: function (res) {

            console.log(res);

          }

        })

2 回复

你好,请提供一下出现问题的机型和微信版本,以及能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。

机型: iPhone 8 iOS 11.4.1

微信版本:6.7.2

代码片段:

var file = wx.getFileSystemManager()

        file.writeFile({

          filePath: wx.env.USER_DATA_PATH + '/test/test.text',

          data: new Uint16Array([97, 32, 72, 101, 108, 108, 111, 32, 119, 111, 114, 108, 100, 33]),

          complete: function (res) {

            console.log(res);

          }

        })

回到顶部