图片内容安全识别报错 fail data exceed max size?
图片大小 300x300 168KB
代码如下:
wx.serviceMarket.invokeService({
service: 'appId',
api: 'imgSecCheck',
data: {
"Action": "ImageModeration",
"Scenes": ["PORN", "POLITICS", "TERRORISM", "TEXT"],
"ImageBase64": imgBase64,
"Config": "",
"Extra": ""
},
}).then(res => {
var responseSuggestion = res.data.Response.Suggestion;
if (responseSuggestion == "PASS") {
//do something
} else if (responseSuggestion == "REVIEW") {
wx.hideLoading()
wx.showToast({
title: '图片疑似含有违法违规内容',
icon: 'none',
})
} else if (responseSuggestion == "BLOCK") {
wx.hideLoading()
wx.showToast({
title: '图片含有违法违规内容',
icon: 'none',
})
} else {
wx.hideLoading()
}
})
检测的图片如下