const writeImgFile = async (path: string, data:string) => {
await Filesystem.writeFile({
path: path,
data: data,
directory: Directory.Documents,
recursive: true // 创建不存在的父级文件夹,
// encoding 不需要
});
};
writeImgFile('/xxx/xx.jpg', base64Str)
capacitor filesystem用base64字符串保存图片
最新推荐文章于 2024-11-12 11:19:19 发布