Browse Source

fix possible nil

pull/1255/head
Chris Lu 5 years ago
parent
commit
17efa361f9
  1. 8
      weed/operation/upload_content.go

8
weed/operation/upload_content.go

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

Loading…
Cancel
Save