mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
weed/operation: fix dropped error (#4888)
This commit is contained in:
parent
6ebe26a765
commit
530bdedf76
|
@ -188,6 +188,9 @@ func doUploadData(data []byte, option *UploadOption) (uploadResult *UploadResult
|
|||
} else if !iAmSure && option.MimeType == "" && len(data) > 16*1024 {
|
||||
var compressed []byte
|
||||
compressed, err = util.GzipData(data[0:128])
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
shouldGzipNow = len(compressed)*10 < 128*9 // can not compress to less than 90%
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue