Files
html/api/ambre-pw-v8-files.php
opus 4ec7c0bb9e
Some checks failed
WEVAL NonReg / nonreg (push) Has been cancelled
auto-sync via WEVIA git_sync_all intent 2026-04-21T23:03:00+02:00
2026-04-21 23:03:00 +02:00

24 lines
833 B
PHP

<?php
header("Content-Type: application/json");
$base = "/var/www/html/api/ambre-pw-tests/output";
$out = ["v8_screenshots"=>[], "v8_video"=>null];
foreach (glob("$base/v8-*.png") as $p) {
$out["v8_screenshots"][] = [
"name" => basename($p),
"size_kb" => round(filesize($p)/1024, 1),
"url" => "https://weval-consulting.com/api/ambre-pw-tests/output/" . basename($p),
];
}
usort($out["v8_screenshots"], function($a,$b){return strcmp($a["name"], $b["name"]);});
foreach (glob("$base/capabilities-v8-*/*.webm") as $w) {
$rel = str_replace($base . "/", "", $w);
$out["v8_video"] = [
"size_mb" => round(filesize($w)/1048576, 2),
"url" => "https://weval-consulting.com/api/ambre-pw-tests/output/" . $rel,
];
}
echo json_encode($out, JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES);