mirror of
https://github.com/garethgeorge/backrest.git
synced 2026-11-01 19:45:20 +00:00
fix: improve download speeds for restored files
This commit is contained in:
1 parent
411a4fb6f0
commit
eb079317c0
1 file changed
+2
-2
@@ -55,8 +55,8 @@ func NewDownloadHandler(oplog *oplog.OpLog) http.Handler {
|
||||
w.Header().Set("Content-Type", "application/gzip")
|
||||
w.Header().Set("Content-Transfer-Encoding", "binary")
|
||||
|
||||
gzw := gzip.NewWriter(w)
|
||||
if err := tarDirectory(w, fullPath); err != nil {
|
||||
gzw, _ := gzip.NewWriterLevel(w, gzip.BestSpeed)
|
||||
if err := tarDirectory(gzw, fullPath); err != nil {
|
||||
zap.S().Errorf("error creating tar archive: %v", err)
|
||||
http.Error(w, "error creating tar archive", http.StatusInternalServerError)
|
||||
return
|
||||
|
||||
Reference in new issue
Block a user