check image exists
This commit is contained in:
parent
a27bf65303
commit
c3d93f64c6
|
@ -347,6 +347,7 @@ class ApiController extends Controller {
|
|||
if ($token)
|
||||
$tk = $token->data;
|
||||
foreach ($ls as $key => $value) {
|
||||
if (file_exists("/var/www/html/BiFace_Server_Lite/web/data/uploads/face/" . $value->image)) {
|
||||
$staffInfo = ListManagement::findOne($value->staff_id);
|
||||
$res = json_decode(file_get_contents($ip . "/api/oem/face_recognition?token=" . $tk, false, stream_context_create([
|
||||
'http' => [
|
||||
|
@ -367,6 +368,9 @@ class ApiController extends Controller {
|
|||
$value->sync_status = 1;
|
||||
$value->save();
|
||||
}
|
||||
} else {
|
||||
$value->delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
return ["status" => true];
|
||||
|
|
Loading…
Reference in New Issue
Block a user