let file = res.tempFiles[0]
var reader = new FileReader();
let base64Src = ""
reader.onload=function(ev){
console.log('result',this.result)
base64Src = this.result
// console.log(ev.target.result)
}
reader.readAsDataURL(file);
let file = res.tempFiles[0]
var reader = new FileReader();
let base64Src = ""
reader.onload=function(ev){
console.log('result',this.result)
base64Src = this.result
// console.log(ev.target.result)
}
reader.readAsDataURL(file);
本文标题:获取到上传文件流 转成base64
本文链接:https://www.haomeiwen.com/subject/ylpxtltx.html
网友评论