aboutsummaryrefslogtreecommitdiff
path: root/weed/operation/upload_content.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/operation/upload_content.go')
-rw-r--r--weed/operation/upload_content.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/weed/operation/upload_content.go b/weed/operation/upload_content.go
index 6bd299826..dcab1a0ae 100644
--- a/weed/operation/upload_content.go
+++ b/weed/operation/upload_content.go
@@ -2,6 +2,7 @@ package operation
import (
"bytes"
+ "compress/flate"
"compress/gzip"
"encoding/json"
"errors"
@@ -50,7 +51,7 @@ func Upload(uploadUrl string, filename string, reader io.Reader, isGzipped bool,
}
return upload_content(uploadUrl, func(w io.Writer) (err error) {
if shouldGzipNow {
- gzWriter := gzip.NewWriter(w)
+ gzWriter, _ := gzip.NewWriterLevel(w, flate.BestSpeed)
_, err = io.Copy(gzWriter, reader)
gzWriter.Close()
} else {