parent
abcaf3aba7
commit
7665b5d504
|
@ -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>
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue