34321-vm/list_recordings.php
2025-09-23 21:41:41 +00:00

18 lines
333 B
PHP

<?php
header('Content-Type: application/json');
$uploadDir = 'uploads/';
$recordings = [];
if (is_dir($uploadDir)) {
$files = scandir($uploadDir);
foreach ($files as $file) {
if ($file !== '.' && $file !== '..') {
$recordings[] = $uploadDir . $file;
}
}
}
echo json_encode($recordings);
?>