pull/144/head
Henrique Dias 2017-01-02 14:06:32 +00:00
parent 18a1b65408
commit b8c82bb841
2 changed files with 6 additions and 3 deletions

View File

@ -125,10 +125,11 @@
{{- if .IsDir }}
<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="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>
{{- end }}
</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)
case "tarbz2":
extension, err = ".tar.bz2", archiver.TarBz2.Make(tempfile, files)
case "tarxz":
extension, err = ".tar.xz", archiver.TarXZ.Make(tempfile, files)
default:
return http.StatusNotImplemented, nil
}