Fix audio playback for newly uploaded files by using dynamic API route

This commit is contained in:
Hördle Bot
2025-11-22 17:53:37 +01:00
parent 6086e1903c
commit 7fc1c2c201
4 changed files with 39 additions and 4 deletions

View File

@@ -561,7 +561,7 @@ export default function AdminPage() {
audioElement?.pause();
// Play new song
const audio = new Audio(`/uploads/${song.filename}`);
const audio = new Audio(`/api/audio/${song.filename}`);
// Handle playback errors
audio.onerror = () => {