diff --git a/dashboard/src/components/app/Backups.vue b/dashboard/src/components/app/Backups.vue index adf6161f1..986bd576a 100644 --- a/dashboard/src/components/app/Backups.vue +++ b/dashboard/src/components/app/Backups.vue @@ -70,7 +70,7 @@ function onActionMenu(backup, event) { icon: 'fa-solid fa-download', label: t('app.backups.backups.downloadBackupTooltip'), visible: backup.site.format === 'tgz' && props.app.accessLevel === 'admin', - action: getDownloadLink.bind(null, backup), + href: getDownloadLink(backup), }, { icon: 'fa-solid fa-file-alt', label: t('app.backups.backups.downloadConfigTooltip'), diff --git a/src/apps.js b/src/apps.js index 33018facf..919b4ef3b 100644 --- a/src/apps.js +++ b/src/apps.js @@ -2833,6 +2833,7 @@ async function getBackupDownloadStream(app, backupId) { const backupSite = await backupSites.get(backup.siteId); if (!backupSite) throw new BoxError(BoxError.NOT_FOUND, 'Backup site not found'); // not possible + if (backupSite.format !== 'tgz') throw new BoxError(BoxError.BAD_STATE, 'only tgz backups can be downloaded'); const ps = new PassThrough();