将文件保存到文件夹
问题描述:
我知道我应该使用任何插件。我目前使用一个名为gif.js的库,它允许我生成一个gif。将文件保存到文件夹
//this is result of create the gif
url = blob:http://localhost:8100/c5b4bc73-e64d-4556-982a-537a7027a1e5;
<Img src = 'blob:http://localhost:8100/c5b4bc73-e64d-4556-982a-537a7027a1e5'>
我可以看到GIF没有任何问题。
我打算将此gif保存在我的android设备上的某个文件夹中。我该怎么做?
答
使用文件传输插件
const fileTransfer = new FileTransfer();
fileTransfer.download(frompath, that.fsurl+topath,
(response) => {
resolve(response);
},
(error) => {
reject(error);
}
);