Skip to content

Commit

Permalink
Fix filename for task submission downloads that don’t have a legacy s…
Browse files Browse the repository at this point in the history
…ubmission ID
  • Loading branch information
jmgasper committed Jun 1, 2023
1 parent a686ee4 commit 15fce4c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/ChallengeEditor/Submissions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -562,9 +562,14 @@ class SubmissionsComponent extends React.Component {
}
checkToCompressFiles()
_.forEach(sortedSubmissions, (submission) => {
let fileName = submission.legacySubmissionId
if (!fileName) {
fileName = submission.id
}
fileName = fileName + '.zip'
submissionsService.downloadSubmission(submission.id)
.then((blob) => {
const file = new window.File([blob], `${submission.legacySubmissionId}.zip`)
const file = new window.File([blob], `${fileName}`)
allFiles.push(file)
downloadedFile += 1
checkToCompressFiles()
Expand Down

0 comments on commit 15fce4c

Please sign in to comment.