|
|
|
|
@ -197,7 +197,9 @@ export default {
|
|
|
|
|
download () {
|
|
|
|
|
this.isDownloading = true
|
|
|
|
|
|
|
|
|
|
fetch(this.baseUrl + `/submitters/${this.submitterSlug}/download`).then((response) => response.json()).then((urls) => {
|
|
|
|
|
fetch(this.baseUrl + `/submitters/${this.submitterSlug}/download`).then(async (response) => {
|
|
|
|
|
if (response.ok) {
|
|
|
|
|
const urls = await response.json()
|
|
|
|
|
const isSafariIos = /iPhone|iPad|iPod/i.test(navigator.userAgent)
|
|
|
|
|
|
|
|
|
|
if (isSafariIos && urls.length > 1) {
|
|
|
|
|
@ -205,6 +207,9 @@ export default {
|
|
|
|
|
} else {
|
|
|
|
|
this.downloadUrls(urls)
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
alert('Failed to download files')
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
downloadUrls (urls) {
|
|
|
|
|
|