diff --git a/app.js b/app.js index b86962e..424f68e 100644 --- a/app.js +++ b/app.js @@ -1793,11 +1793,10 @@ function formatShortDate(ts) { } function openFileViewer({ url, blob, mime }, filename) { - const isPdf = (mime || '').includes('pdf') || /\.pdf$/i.test(filename); const isImage = (mime || '').startsWith('image/'); - if (!isPdf && !isImage) { - // Nicht inline anzeigbar → Download anstoßen + if (!isImage) { + // Alles außer Bildern: direkt Download const a = document.createElement('a'); a.href = url; a.download = filename || 'download'; @@ -1805,6 +1804,7 @@ function openFileViewer({ url, blob, mime }, filename) { a.click(); a.remove(); setTimeout(() => URL.revokeObjectURL(url), 10000); + showToast('⬇ ' + escapeHtml(filename || 'Datei') + ' wird heruntergeladen'); return; } @@ -1814,12 +1814,9 @@ function openFileViewer({ url, blob, mime }, filename) {