From 530bdedf763a1c1754784debc331f02201cb910f Mon Sep 17 00:00:00 2001 From: Lars Lehtonen Date: Tue, 3 Oct 2023 10:55:20 -0700 Subject: [PATCH] weed/operation: fix dropped error (#4888) --- weed/operation/upload_content.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/weed/operation/upload_content.go b/weed/operation/upload_content.go index 108ec3df2..0413f433b 100644 --- a/weed/operation/upload_content.go +++ b/weed/operation/upload_content.go @@ -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% } }