我正在尝试从图库中删除图像。
显示错误:
resolveLocalFileSystemURI的参数“ uri”的类型错误:预期 字符串,但是得到了数组。
代码
let data:Array<{ imgUrl: string, fileName: string }>;
data = new Array();
let j = 0;
for(let test of pathimg){
data.push({imgUrl:pathimg,fileName:filename[j]+'.png'});
j++;
}
for(let test of data){
this.file.removeFile(test.imgUrl, test.fileName).then(_ =>
console.log('deleted succesfully')).catch(err =>
console.log('cannot delete'));
}