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

Support on Static Routes to flag them as "Download Only" #243

Closed
Badgerati opened this issue May 5, 2019 · 0 comments · Fixed by #246
Closed

Support on Static Routes to flag them as "Download Only" #243

Badgerati opened this issue May 5, 2019 · 0 comments · Fixed by #246
Assignees
Milestone

Comments

@Badgerati
Copy link
Owner

Static routes at the moment only support rendering of static content. This enhancement is to have some -DownloadOnly switch which, when supplied, will flag a specific static route to instead attach it's files (for downloading) instead of rendering them.

Idea:

route static '/images' './my-images' -do

This way if someone hit http://localhost/images/cats/fluffy.png, then the fluffy.png image is downloaded instead of rendered in the browser.

  • If a static route is enabled for downloading only, then default files are not respected - the path supplied must be whole.
  • Caching is not used (it's not supported on the attach function anyway, but just ensuring).
@Badgerati Badgerati self-assigned this May 7, 2019
Badgerati added a commit that referenced this issue May 7, 2019
Badgerati added a commit that referenced this issue May 8, 2019
@Badgerati Badgerati added this to the 0.29.0 milestone May 8, 2019
Badgerati added a commit that referenced this issue May 8, 2019
Resolves #243 - Dowload on Static Routes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant