请问下h5plus怎么存储录音blob文件储存到本地 _doc 目录下,writer.write()方法好像只能写入字符串
fs.root.getFile("_doc/" + fileName,{create:true}, (fileEntry)=> {
fileEntry.createWriter((writer) => {
writer.write(dataStr)
writer.onwriteend = ()=> {
console.log("文件写入成功",this.tips);
res(this.tips.success)
};
writer.onerror = (e)=> {
console.log("文件写入失败: " + e.toString());
rej(e.message)
};
}, (e) => {
console.err('writeFile error:', e.message)
rej(e.message)
})
});
0 个回复