Former-commit-id: b8c82bb841
pull/726/head
Henrique Dias 2017-01-02 14:06:32 +00:00
parent abcaf3aba7
commit 7665b5d504
2 changed files with 6 additions and 3 deletions

View File

@ -125,10 +125,11 @@
{{- if .IsDir }} {{- if .IsDir }}
<ul class="dropdown" id="download-drop"> <ul class="dropdown" id="download-drop">
<a data-format="tarbz2" href="?download=tarbz2"><li>tar.bz2</li></a>
<a data-format="targz" href="?download=targz"><li>tar.gz</li></a>
<a data-format="tar" href="?download=tar"><li>tar</li></a>
<a data-format="zip" href="?download=zip"><li>zip</li></a> <a data-format="zip" href="?download=zip"><li>zip</li></a>
<a data-format="tar" href="?download=tar"><li>tar</li></a>
<a data-format="targz" href="?download=targz"><li>tar.gz</li></a>
<a data-format="tarbz2" href="?download=tarbz2"><li>tar.bz2</li></a>
<a data-format="tarbz2" href="?download=tarxz"><li>tar.xz</li></a>
</ul> </ul>
{{- end }} {{- end }}
</div> </div>

View File

@ -71,6 +71,8 @@ func Download(w http.ResponseWriter, r *http.Request, c *config.Config, i *file.
extension, err = ".tar.gz", archiver.TarGz.Make(tempfile, files) extension, err = ".tar.gz", archiver.TarGz.Make(tempfile, files)
case "tarbz2": case "tarbz2":
extension, err = ".tar.bz2", archiver.TarBz2.Make(tempfile, files) extension, err = ".tar.bz2", archiver.TarBz2.Make(tempfile, files)
case "tarxz":
extension, err = ".tar.xz", archiver.TarXZ.Make(tempfile, files)
default: default:
return http.StatusNotImplemented, nil return http.StatusNotImplemented, nil
} }