🍻 醉酒写代码
This commit is contained in:
@@ -107,8 +107,11 @@ class Upload extends Base
|
||||
$result = json_decode($response->getBody()->getContents());
|
||||
if (0 == $result->error_code) {
|
||||
if ($result->rating_index >= $this->config['audit_index']) {
|
||||
/*$strategy->delete($pathname);
|
||||
throw new Exception('图片[' . $image->getInfo('name') . ']涉嫌违规,禁止上传!');*/
|
||||
// 是否直接拦截色情图片
|
||||
if (Config::get('site.intercept_salacity')) {
|
||||
$strategy->delete($pathname);
|
||||
throw new Exception('图片[' . $image->getInfo('name') . ']涉嫌违规,禁止上传!');
|
||||
}
|
||||
$suspicious = 1;
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by WispX.
|
||||
* User: WispX
|
||||
* Date: 2019/5/8
|
||||
* Time: 21:33
|
||||
*/
|
||||
|
||||
return [
|
||||
// 色情图片是否直接拦截
|
||||
'intercept_salacity' => false,
|
||||
];
|
||||
Reference in New Issue
Block a user