Skip to content

Commit

Permalink
Use legacy submission ID when downloading
Browse files Browse the repository at this point in the history
  • Loading branch information
jmgasper committed May 24, 2023
1 parent 83ee235 commit 75c7bdd
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/components/ChallengeEditor/Submissions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 75c7bdd

Please sign in to comment.