Files
html/api/ambre-pw-files.php
opus 4e971701fa
Some checks failed
WEVAL NonReg / nonreg (push) Has been cancelled
auto-sync via WEVIA git_sync_all intent 2026-04-21T16:43:29+02:00
2026-04-21 16:43:29 +02:00

35 lines
1.1 KiB
PHP

<?php
header("Content-Type: application/json");
$base = "/var/www/html/api/ambre-pw-tests/output";
$out = ["v2_screenshots"=>[], "v2_videos"=>[], "v1_videos"=>[]];
foreach (glob("$base/v2-*.png") as $p) {
$out["v2_screenshots"][] = [
"name" => basename($p),
"size_kb" => round(filesize($p)/1024, 1),
"url" => "https://weval-consulting.com/api/ambre-pw-tests/output/" . basename($p),
];
}
// V2 webm in new subdir
foreach (glob("$base/chat-capabilities-v2-*/*.webm") as $w) {
$rel = str_replace($base . "/", "", $w);
$out["v2_videos"][] = [
"name" => basename($w),
"size_kb" => round(filesize($w)/1024, 1),
"url" => "https://weval-consulting.com/api/ambre-pw-tests/output/" . $rel,
];
}
// V1 webm
foreach (glob("$base/chat-capabilities-WEVIA-*/*.webm") as $w) {
$rel = str_replace($base . "/", "", $w);
$out["v1_videos"][] = [
"name" => basename($w),
"size_kb" => round(filesize($w)/1024, 1),
"url" => "https://weval-consulting.com/api/ambre-pw-tests/output/" . $rel,
];
}
echo json_encode($out, JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES);