Skip to content

Commit 75c7bdd

Browse files
committed
Use legacy submission ID when downloading
1 parent 83ee235 commit 75c7bdd

File tree

1 file changed

+3
-4
lines changed
  • src/components/ChallengeEditor/Submissions

1 file changed

+3
-4
lines changed

src/components/ChallengeEditor/Submissions/index.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ class SubmissionsComponent extends React.Component {
478478
const url = window.URL.createObjectURL(new Blob([blob]))
479479
const link = document.createElement('a')
480480
link.href = url
481-
link.setAttribute('download', `submission-${s.id}.zip`)
481+
link.setAttribute('download', `${s.legacySubmissionId}.zip`)
482482
document.body.appendChild(link)
483483
link.click()
484484
link.parentNode.removeChild(link)
@@ -525,10 +525,9 @@ class SubmissionsComponent extends React.Component {
525525
}
526526
checkToCompressFiles()
527527
_.forEach(sortedSubmissions, (submission) => {
528-
const mmSubmissionId = submission.id
529-
submissionsService.downloadSubmission(mmSubmissionId)
528+
submissionsService.downloadSubmission(submission.id)
530529
.then((blob) => {
531-
const file = new window.File([blob], `submission-${mmSubmissionId}.zip`)
530+
const file = new window.File([blob], `${submission.legacySubmissionId}.zip`)
532531
allFiles.push(file)
533532
downloadedFile += 1
534533
checkToCompressFiles()

0 commit comments

Comments
 (0)