在使用 canvas 将 img 的 src 地址转换为 base64 调用 canvas.toDataURL() 时,遇到跨域问题并报错如下Failed to execute 'toDataURL' on 'HTMLCanvasElement': Tainted canvases may not be exported. at img.onload解决方案:在 onload 之前添加 crossOrigin 参数 var img...
问题在开发一个thinkphp的项目时,当文件有60M上传时,发现接口返回了413报错,导致上传失败。client intended to send too large body: 64390300 bytes request解决方案基于宝塔面板、tinkphp、nginx,需要设置三个地方nginx在 nginx 中配置 client_max_body_size为需要的大小 如下图调整后记得重启 nginxphp找到你这个项目当...