mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-11-28 05:15:00 +08:00
consistent gzip logic
local store gzip same as replicated writes
This commit is contained in:
parent
560df51def
commit
22400c6633
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user