From 75c7bdd93f2c6f16109bf7f095f3efc3ff9f275a Mon Sep 17 00:00:00 2001 From: Justin Gasper Date: Wed, 24 May 2023 16:53:01 +1000 Subject: [PATCH] Use legacy submission ID when downloading --- src/components/ChallengeEditor/Submissions/index.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/components/ChallengeEditor/Submissions/index.js b/src/components/ChallengeEditor/Submissions/index.js index 53ce239c..b7f20abb 100644 --- a/src/components/ChallengeEditor/Submissions/index.js +++ b/src/components/ChallengeEditor/Submissions/index.js @@ -478,7 +478,7 @@ class SubmissionsComponent extends React.Component { const url = window.URL.createObjectURL(new Blob([blob])) const link = document.createElement('a') link.href = url - link.setAttribute('download', `submission-${s.id}.zip`) + link.setAttribute('download', `${s.legacySubmissionId}.zip`) document.body.appendChild(link) link.click() link.parentNode.removeChild(link) @@ -525,10 +525,9 @@ class SubmissionsComponent extends React.Component { } checkToCompressFiles() _.forEach(sortedSubmissions, (submission) => { - const mmSubmissionId = submission.id - submissionsService.downloadSubmission(mmSubmissionId) + submissionsService.downloadSubmission(submission.id) .then((blob) => { - const file = new window.File([blob], `submission-${mmSubmissionId}.zip`) + const file = new window.File([blob], `${submission.legacySubmissionId}.zip`) allFiles.push(file) downloadedFile += 1 checkToCompressFiles()