核心提示:ionic3中,利用cordova-plugin-filechooser插件可以进行文件选择,如果选择的文件名是中文,返回的uri会出现乱码解决方法decodeURI()this.fileChoose...
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 ""; });