fix possible nil

This commit is contained in:
Chris Lu 2020-03-14 13:53:03 -07:00
parent 91e0a987e4
commit 17efa361f9

View file

@ -120,10 +120,12 @@ func doUploadData(uploadUrl string, filename string, cipher bool, data []byte, i
}, filename, contentIsGzipped, mtype, pairMap, jwt) }, filename, contentIsGzipped, mtype, pairMap, jwt)
} }
if uploadResult != nil {
uploadResult.Size = uint32(clearDataLen) uploadResult.Size = uint32(clearDataLen)
if contentIsGzipped { if contentIsGzipped {
uploadResult.Gzip = 1 uploadResult.Gzip = 1
} }
}
return uploadResult, err return uploadResult, err
} }