atob解码图片base64时候报错

最近在改一个bug, 使用图片的base64编码 进行压缩时一直报错,Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded 深入查看原因后,发现是base64 在被传入 atob函数时报的错误,  atob有过初略的了解应该是解码之类的函数,那应该错误的原因就是解码失败了。  
相关文章
相关标签/搜索