解决了吗 我也遇到了 好哥们
wx.uploadFile报413是什么原因?wx.uploadFile({ url: app.API.newImageUpload, filePath: item.path, name: 'file', header: { "content-type": "application/json" }, }) 只要上传原图就会报错,和图片大小没关系,原图也不到1M,在开发版中不会出现,只会在正式版里出现,报错内容如下 {"data": "<html> \n<head><title>413 Request Entity Too Large</title></head> \n<body> \n<center><h1>413 Request Entity Too Large</h1></center> \n<hr><center>openresty/1.19.9.1</center> \n</body> \n</html> \n<!-- a padding to disable MSIE and Chrome friendly error page --> \n<!-- a padding to disable MSIE and Chrome friendly error page --> \n<!-- a padding to disable MSIE and Chrome friendly error page --> \n<!-- a padding to disable MSIE and Chrome friendly error page --> \n<!-- a padding to disable MSIE and Chrome friendly error page --> \n<!-- a padding to disable MSIE and Chrome friendly error page --> \n", "header": {"Access-Control-Allow-Origin": "*", "Connection": "keep-alive", "Set-Cookie": "acw_tc=0b3c7da216844122592593626efa565e39c19dcf2ab1b56f8b6f68610c6396;path=/;HttpOnly;Max-Age=1800", "Content-Length": "591", "Date": "Thu, 18 May 2023 12:17:39 GMT", "Content-Type": "text/html; charset=utf-8", "protocol": "http/1.1"}, "statusCode": 413, "cookies": ["acw_tc=0b3c7da216844122592593626efa565e39c19dcf2ab1b56f8b6f68610c6396;path=/;HttpOnly;Max-Age=1800"], "errMsg": "uploadFile:ok"}
2023-08-01