This is my Content URI ,I want to convert it to file URI
我正在尝试从gmail导入附件,所以我从webintent获取uri,但这是内容uri,我想转换为文件uri
我在各种问题中尝试了很多方法,但我的代码仍无法调用成功。我不明白我的代码是什么错误
window.plugins.webintent.getUri(function(url) {
if(url.startsWith('content://')) {
// url is the url the intent was launched with
alert(url);
window.FilePath.resolveNativePath(url, function(local)
{ deferred.resolve('file://'+result)
},function (error)
{
alert("error");
}
);
});
它将进入错误状态