close #2
parent
18a1b65408
commit
b8c82bb841
|
@ -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>
|
||||||
|
|
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue