feat: Enhance FaceAI functionality with storage management and update deployment instructions
All checks were successful
Publish FaceAI Container / publish (push) Successful in 5m45s
All checks were successful
Publish FaceAI Container / publish (push) Successful in 5m45s
This commit is contained in:
parent
c0d072c6ea
commit
23f811e465
14 changed files with 500 additions and 22 deletions
|
|
@ -54,12 +54,23 @@ try {
|
|||
$photoIds[$photoId] = true;
|
||||
}
|
||||
|
||||
header('Location: ' . faceai_build_url($returnUrl, array(
|
||||
$matchCount = count($photoIds);
|
||||
if ($matchCount === 0) {
|
||||
header('Location: ' . faceai_build_url($returnUrl, array(
|
||||
'faceaiMatchSource' => 'faceai',
|
||||
'faceaiMatchCount' => 0
|
||||
)), true, 302);
|
||||
exit;
|
||||
}
|
||||
|
||||
$storageKey = 'faceai-result-' . preg_replace('/[^a-zA-Z0-9_-]/', '', $resultId);
|
||||
$redirectUrl = faceai_build_url($returnUrl, array(
|
||||
'faceaiMatchSource' => 'faceai',
|
||||
'faceaiMatchCount' => count($photoIds),
|
||||
'faceaiPhotoIds' => implode(',', array_keys($photoIds))
|
||||
)), true, 302);
|
||||
exit;
|
||||
'faceaiMatchCount' => $matchCount,
|
||||
'faceaiMatchStorageKey' => $storageKey
|
||||
));
|
||||
|
||||
faceai_render_storage_redirect_page($redirectUrl, $storageKey, array_keys($photoIds), $matchCount, (string) ($result['raceId'] ?? ($payload['raceId'] ?? '')));
|
||||
} catch (Throwable $error) {
|
||||
faceai_render_message_page('Errore return FaceAI', $error->getMessage(), array(), 500);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue