Skip to content

Commit

Permalink
Refactor media display functionality to limit the number of files ret…
Browse files Browse the repository at this point in the history
…urned
  • Loading branch information
judemont committed Sep 26, 2024
1 parent 38a58ee commit 92b2f32
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/recive_all.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
$mediaDir = __DIR__ . '/../medias/';
$files = array_diff(scandir($mediaDir), ['.', '..']);
shuffle($files);
echo json_encode(['success' => true, 'files' => array_values($files)]);
echo json_encode(['success' => true, 'files' => array_values(array_slice($files, 0, 70))]);
?>

0 comments on commit 92b2f32

Please sign in to comment.