Description
serve-index
is great because it allows a quick, generic file viewer.
I've been using it for https://telebit.cloud's directory serving option (telebit http ~/path/to/share
) as a poor-man's airdrop/dropbox so that I quickly share files with others.
However, there are two things that make it somewhat inconvenient:
- inability to quickly download a file
- inability to quickly download a group of files
If we had a download icon next to the file that would append ?download=true
to the url, then that could be a cue to serve-static
to add the appropriate Content-Disposition
header so that an image would download rather than go into view mode.
Likewise, if we had the option to save as zip that would append ?download=true&format=zip
we could have serve-index
provide the file as a zip file (and leave the dependency as optional, simply returning an error if the option in enabled and the dependency is not installed).
I'm wondering if you'd be open to either or both of these suggestions.