From 4c42bc23ec72c7fdb26eed65b6d1ebe22f9b1429 Mon Sep 17 00:00:00 2001 From: Christoph Wiechert Date: Tue, 21 Nov 2017 13:25:01 +0100 Subject: [PATCH] Fix: iOS shows some files instead of downloading it --- app/src/Download.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/Download.vue b/app/src/Download.vue index eba43da..98c2d9e 100644 --- a/app/src/Download.vue +++ b/app/src/Download.vue @@ -117,7 +117,10 @@ alert('One-Time Download: File is not available anymore.'); return; } - document.location.href = file.url; + const aEl = document.createElement('a'); + aEl.setAttribute('href', file.url); + aEl.setAttribute('download', file.metadata.name); + aEl.click(); file.downloaded = true; },