diff options
| author | Chris Lu <chris.lu@gmail.com> | 2020-04-14 11:02:05 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2020-04-14 11:02:05 -0700 |
| commit | 3f1d79512fbd2ff4c108af5016b38533e4b0300b (patch) | |
| tree | 8d241d8e575905ff55257587bd39ff18f88e884a | |
| parent | d2d15978502ff3b45b010f546beaf226321dddb1 (diff) | |
| download | seaweedfs-3f1d79512fbd2ff4c108af5016b38533e4b0300b.tar.xz seaweedfs-3f1d79512fbd2ff4c108af5016b38533e4b0300b.zip | |
only detect when not sure about the types
| -rw-r--r-- | weed/operation/upload_content.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/weed/operation/upload_content.go b/weed/operation/upload_content.go index f582c4279..d4a334f05 100644 --- a/weed/operation/upload_content.go +++ b/weed/operation/upload_content.go @@ -79,7 +79,7 @@ func doUploadData(uploadUrl string, filename string, cipher bool, data []byte, i if !isInputGzipped { if shouldBeZipped, iAmSure := util.IsGzippableFileType(filepath.Base(filename), mtype); iAmSure && shouldBeZipped { shouldGzipNow = true - } else if mtype == "" && len(data) > 128 { + } else if !iAmSure && mtype == "" && len(data) > 128 { var compressed []byte compressed, err = util.GzipData(data[0:128]) shouldGzipNow = len(compressed)*10 < 128*9 // can not compress to less than 90% |
