Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

download file when submission is single source #2714

Merged
merged 1 commit into from
Sep 27, 2024

Conversation

as6325400
Copy link
Contributor

When there is only one uploaded file, download the file directly instead of downloading a compressed file.

Copy link

sentry-io bot commented Sep 22, 2024

🔍 Existing Issues For Review

Your pull request is modifying functions with the following pre-existing issues:

📄 File: webapp/src/Controller/Team/SubmissionController.php

Function Unhandled Issue
App\Controller\Team\SubmissionController::downloadAction ErrorException: Warning: ZipArchive::close(): Seek error: No space left on device /src/Service/SubmissionService.php in App\Service\Submission...
Event Count: 4
📄 File: webapp/src/Service/SubmissionService.php (Click to Expand)
Function Unhandled Issue
App\Service\SubmissionService::getSubmissionZipResponse ErrorException: Warning: ZipArchive::close(): Seek error: No space left on device /src/Service/SubmissionService.php in App\Service\Submission...
Event Count: 4
---

Did you find this useful? React with a 👍 or 👎

webapp/src/Service/SubmissionService.php Outdated Show resolved Hide resolved
}


public function getSubmissionFileNums(Submission $submission): int
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I would prefer the name getSubmissionFileCount (and I assume we can mark it as private)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, Should I modify it once more, or will you handle the changes when merging?

webapp/src/Controller/Team/SubmissionController.php Outdated Show resolved Hide resolved
Copy link
Member

@vmcj vmcj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will remove the x bit from such files, whether that is fine I leave up to the rest.

webapp/src/Service/SubmissionService.php Show resolved Hide resolved
webapp/src/Service/SubmissionService.php Outdated Show resolved Hide resolved
webapp/src/Controller/Team/SubmissionController.php Outdated Show resolved Hide resolved
@as6325400 as6325400 changed the base branch from 8.3 to main September 27, 2024 19:09
add spaces before/after, change method name,
change download content type

Update webapp/src/Service/SubmissionService.php

Co-authored-by: MCJ Vasseur <[email protected]>

Update webapp/src/Controller/Team/SubmissionController.php

Co-authored-by: MCJ Vasseur <[email protected]>

Update webapp/src/Service/SubmissionService.php

Co-authored-by: MCJ Vasseur <[email protected]>
@meisterT meisterT added this pull request to the merge queue Sep 27, 2024
Merged via the queue into DOMjudge:main with commit 0576250 Sep 27, 2024
26 checks passed
@as6325400 as6325400 deleted the 8.3.1_download_code branch September 27, 2024 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants