From 08b093b63c66e1978001f25a2ef9e16274882d94 Mon Sep 17 00:00:00 2001 From: lelo Date: Thu, 29 May 2025 11:45:43 +0000 Subject: [PATCH] possible fix for not working downloads --- static/audioplayer.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/static/audioplayer.js b/static/audioplayer.js index 5b920c2..1834b18 100644 --- a/static/audioplayer.js +++ b/static/audioplayer.js @@ -119,6 +119,8 @@ async function downloadAudio() { // Create a “real” link to that URL and click it const a = document.createElement('a'); a.href = downloadUrl.toString(); + a.download = ''; // tell Safari “this is a download” + a.target = '_blank'; // force a real navigation on iOS // NOTE: do NOT set a.download here – we want the server's Content-Disposition to drive it document.body.appendChild(a); a.click();