From 45e6cb65c3d9758743bba26342ec02ad38f75d22 Mon Sep 17 00:00:00 2001 From: jojoliang Date: Mon, 8 Mar 2021 19:34:59 +0800 Subject: [PATCH] update --- object.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/object.go b/object.go index ddc3f8c..585b554 100644 --- a/object.go +++ b/object.go @@ -895,7 +895,7 @@ func (s *ObjectService) Upload(ctx context.Context, name string, filepath string return v, resp, err } - if opt.EnableVerification { + if resp != nil && opt.EnableVerification { scoscrc := resp.Header.Get("x-cos-hash-crc64ecma") icoscrc, _ := strconv.ParseUint(scoscrc, 10, 64) if icoscrc != localcrc {