backups: encrypted backups must have .enc extension

This commit is contained in:
Girish Ramakrishnan
2023-07-24 22:25:06 +05:30
parent febac9e8ca
commit 3d5c21d9ca
7 changed files with 28 additions and 42 deletions

View File

@@ -890,8 +890,8 @@ async function downloadBackup(req, res, next) {
const [error, result] = await safe(apps.getBackupDownloadStream(req.app, req.params.backupId));
if (error) return next(BoxError.toHttpError(error));
res.attachment(`${req.params.backupId}.tgz`);
result.pipe(res);
res.attachment(result.filename);
result.stream.pipe(res);
}
async function uploadFile(req, res, next) {