mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
clean up
This commit is contained in:
parent
2e3f6ad3a9
commit
3934c69757
|
@ -158,8 +158,6 @@ func doUpload(uploadUrl string, filename string, cipher bool, reader io.Reader,
|
|||
}
|
||||
}
|
||||
|
||||
println("data size", clearDataLen)
|
||||
|
||||
if cipher {
|
||||
// encrypt(gzip(data))
|
||||
|
||||
|
@ -170,12 +168,10 @@ func doUpload(uploadUrl string, filename string, cipher bool, reader io.Reader,
|
|||
err = fmt.Errorf("encrypt input: %v", encryptionErr)
|
||||
return
|
||||
}
|
||||
println("encrypted data size", len(encryptedData))
|
||||
|
||||
// upload data
|
||||
uploadResult, err = upload_content(uploadUrl, func(w io.Writer) (err error) {
|
||||
n, err := w.Write(encryptedData)
|
||||
println("writtern data size", n)
|
||||
_, err = w.Write(encryptedData)
|
||||
return
|
||||
}, "", false, "", nil, jwt)
|
||||
if uploadResult != nil {
|
||||
|
@ -187,8 +183,7 @@ func doUpload(uploadUrl string, filename string, cipher bool, reader io.Reader,
|
|||
} else {
|
||||
// upload data
|
||||
uploadResult, err = upload_content(uploadUrl, func(w io.Writer) (err error) {
|
||||
n, err := w.Write(data)
|
||||
println("written data size", n)
|
||||
_, err = w.Write(data)
|
||||
return
|
||||
}, filename, contentIsGzipped, mtype, pairMap, jwt)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue