From 22400c66331e90fd5aa430c243af2eadfdfe9b12 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Sun, 15 Mar 2020 04:15:40 -0700 Subject: [PATCH] consistent gzip logic local store gzip same as replicated writes --- weed/storage/needle/needle_parse_upload.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weed/storage/needle/needle_parse_upload.go b/weed/storage/needle/needle_parse_upload.go index 85526aaa8..0babeda20 100644 --- a/weed/storage/needle/needle_parse_upload.go +++ b/weed/storage/needle/needle_parse_upload.go @@ -55,7 +55,7 @@ func ParseUpload(r *http.Request, sizeLimit int64) (pu *ParsedUpload, e error) { pu.OriginalDataSize = len(unzipped) pu.UncompressedData = unzipped } - } else if shouldGzip, _ := util.IsGzippableFileType("", pu.MimeType); shouldGzip { + } else if shouldGzip, _ := util.IsGzippableFileType("", pu.MimeType); pu.MimeType == "" || shouldGzip { if compressedData, err := util.GzipData(pu.Data); err == nil { pu.Data = compressedData pu.IsGzipped = true