1.视频图片采样
2.对图片采样进行检测:
检测代码如下(微信敏感图片检测):
const
cntURL = 'https://api.weixin.qq.com/wxa/img_sec_check?access_token=%s';
var
sURL : string;
sResult, sIniFilePath : string;
jResult : ISuperObject;/superobject
vData : TMultipartFormData;//System.Net.Mime
AIni: TInifile;
bIsAllSec: Boolean;//视频是否全是敏感
begin
try
sIniFilePath := ChangeFileExt(ParamStr(0), '.ini');
sIniFilePath := ExtractFilePath(sIniFilePath) + ChangeFileExt(ExtractFileName(sIniFilePath), '') + '_Debug.ini';
AIni:= TInifile.create( sIniFilePath );
bIsAllSec := AIni.readBool('测试', '全敏感视频', False);//额外测试开关
AIni.free;
if bIsAllSec then
begin
ErrCode := '87014';
ErrMsg := '图片含有不合规内容,禁止上传';
Exit(True);
end;
sURL := Format(cntURL, [TGetAccessTokenAction.Gaccess_token]);
//DLog('图片位置:&#