-
Notifications
You must be signed in to change notification settings - Fork 397
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
feat(gnoweb): download source #3900
base: master
Are you sure you want to change the base?
feat(gnoweb): download source #3900
Conversation
🛠 PR Checks Summary🔴 Changes related to gnoweb must be reviewed by its codeowners Manual Checks (for Reviewers):
Read More🤖 This bot helps streamline PR reviews by verifying automated checks and providing guidance for contributors and reviewers. ✅ Automated Checks (for Contributors):🟢 Maintainers must be able to edit this pull request (more info) ☑️ Contributor Actions:
☑️ Reviewer Actions:
📚 Resources:Debug
|
Codecov ReportAttention: Patch coverage is
📢 Thoughts on this report? Let us know! |
This PR adds a new feature that enables users to directly download source files. A new variable,
FileDownload
, is added to thesource_view
component, providing a URL that triggers a raw file download when clicked. This change improves user experience by allowing quick access to the raw source without the additional HTML layout.Direct Download Link:
The source view template now utilizes the
.FileDownload
variable to render a download link. When clicked, this link invokes the download handler, which returns the raw file content as an attachment.Enhanced Routing:
The handler has been updated to check for the download parameter early in the request cycle. If detected, the request is redirected to the dedicated GetSourceDownload function, ensuring that only the raw file is sent back to the client.
TODO: