ionic3中,利用cordova-plugin-filechooser插件可以进行文件选择,如果选择的文件名是中文,返回的uri会出现乱码
解决方法
decodeURI()
this.fileChooser.open()
.then(uri => {
console.log(uri);
this.filePath=decodeURI(uri);
return this.filePath;
})
.catch(e => {
console.log(e)
return "";
});