搞清楚了.云函数路口参数不能大于10kb.之前用base64上传到云函数超过max.
图片上传.开发工具调试正常.用手机iphone和安卓都提示超过限制.可是我图片也才100多kb?谢谢大佬解答 上传图片出错 Error: errCode: -1 | errMsg: cloud.callFunction:fail Error: data exceed max size (callId: 1594305163948-0.6454455064365248) (trace: 22:32:43 start->22:32:49 system error (Error: data exceed max size), retry->22:32:50 system error (Error: data exceed max size), retry->22:32:55 system error (Error: data exceed max size), abort); at cloud.callFunction api; at new u (eval at n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:261144) at d (eval at n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:261651) at f (eval at n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:261746) at eval (eval at n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:428279) at eval (eval at n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:65969) at eval (eval at n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:66078) at e (eval at n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:68530) at e.exports (eval at n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:27369) at y.<computed> (eval at n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:32768) at Number.r (eval at n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:32467)
2020-07-10老哥解决了么?同样问题.100kb图片真机会报max限制.发帖这里也没人回
cloud.openapi.security.img,开发工具上传都无问题,线上发版后真机各种bug如题, 接口图片校验:cloud.openapi.security.img,开发工具上传都无问题,线上发版后真机各种bug。 都已经发版本了,直接提示图片超过max size。可是开发工具提交相同图片,没有任何问题。 图片不超过1M。100k都不到。 1.发布版本,出错。 [图片] 2.真机调试,也是出错。 Error: errCode: -1 | errMsg: cloud.callFunction:fail Error: data exceed max size (callId: 1588248668719-0.3950792483647896) (trace: 20:11:8 start->20:11:15 system error (Error: data exceed max size), retry->20:11:23 system error (Error: data exceed max size), retry->20:11:27 system error (Error: data exceed max size), abort); at cloud.callFunction api; at new u (eval at n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:251050) at d (eval at n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:251557) at f (eval at n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:251652) at eval (eval at n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:417028) at t (eval at n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:65689) at eval (eval at n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:65811) at e (eval at n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:68267) at e.exports (eval at n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:27077) at y.<computed> (eval at n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:32480) at Number.r (eval at n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:32179) 3.开发工具上传,没有任何问题。 [图片] [云函数] [openapi] requestimgSecCheck 调用成功: {errMsg: "cloud.callFunction:ok", result: {…}, requestID: "9c5c704f-8adc-11ea-9a0e-5254002a370e"}errMsg: "cloud.callFunction:ok"requestID: "9c5c704f-8adc-11ea-9a0e-5254002a370e"result: {errMsg: "openapi.security.imgSecCheck:ok", errCode: 0}__proto__: Object哎。天天不知道弄什么,要内容检测、图片检测, 天天审核上传非法图片,拒绝通过我的代码, 结果对接了真机用不了。
2020-07-09有没有大神答疑啊?万分感谢.
图片上传.开发工具调试正常.用手机iphone和安卓都提示超过限制.可是我图片也才100多kb.谢?上传图片出错 Error: errCode: -1 | errMsg: cloud.callFunction:fail Error: data exceed max size (callId: 1594227691875-0.743559038941618) (trace: 1:1:31 start->1:1:32 system error (Error: data exceed max size), retry->1:1:33 system error (Error: data exceed max size), retry->1:1:34 system error (Error: data exceed max size), abort); at cloud.callFunction api; at new u (eval at n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:260333) at d (eval at n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:260840) at f (eval at n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:260935) at eval (eval at n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:427467) at eval (eval at n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:65969) at eval (eval at n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:66078) at e (eval at n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:68530) at e.exports (eval at n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:27369) at y.<computed> (eval at n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:32768) at Number.r (eval at n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:32467)
2020-07-09解决了么 ?
云调用校验图片接口,文件大小为 54209,提示 data exceed max size ?---备注:上个问题一直没人回复,所以新发一条 上个问题链接:https://developers.weixin.qq.com/community/develop/doc/0002661b1fcc98cd522a3661052800?highLine=data%2520exceed%2520max%2520size 很奇怪 有些图片是可以上传的,有些上传不了,文件也没有超过限制大小呀 下面是调用代码 wx.getFileSystemManager().readFile({ filePath: tempFilePaths[0], success: buffer => { setTimeout(function () { wx.showLoading({ title: '请稍等', }) }, 350) wx.cloud.init({ env: '*****' }) wx.cloud.callFunction({ name: "imgseccheck", data: { value: buffer.data } }).then( imgRes => { wx.hideLoading() //console.log(imgRes) if (imgRes.result.errCode == 87014) { wx.showToast({ title: '图片含有违法违规内容', icon: 'none', duration: 1500 }) } else { //*** } } ).catch(error => { wx.showToast({ title: '未知错误', icon: 'none', duration: 1500 }) }) }, fail: err => { wx.showToast({ title: err, icon: "none", duration: 1500 }) } }) } 上传的文件大小是54209 [图片] 报错信息是"cloud.callFunction:fail Error: data exceed max size (callId: 1585894770302-0.7523036534558765) (trace: 14:19:30 start->14:19:31 system error (Error: data exceed max size), retry->14:19:33 system error (Error: data exceed max size), retry->14:19:35 system error (Error: data exceed max size), abort); at cloud.callFunction api; " [图片]
2020-07-09