diff options
| author | Chris Lu <chris.lu@gmail.com> | 2020-08-15 19:55:28 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2020-08-15 19:55:28 -0700 |
| commit | 003d48da21b0ecd0758d79bfed234cb2bf820398 (patch) | |
| tree | 0b2bc5f2497280196ed2986f77a2b28e2d04b789 /weed/operation | |
| parent | 6ee8d952d24181e3b0b590aef77e96b289d49f73 (diff) | |
| download | seaweedfs-003d48da21b0ecd0758d79bfed234cb2bf820398.tar.xz seaweedfs-003d48da21b0ecd0758d79bfed234cb2bf820398.zip | |
adjust logs
Diffstat (limited to 'weed/operation')
| -rw-r--r-- | weed/operation/upload_content.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/weed/operation/upload_content.go b/weed/operation/upload_content.go index e1914f20a..f59c7e1a9 100644 --- a/weed/operation/upload_content.go +++ b/weed/operation/upload_content.go @@ -33,6 +33,7 @@ type UploadResult struct { } func (uploadResult *UploadResult) ToPbFileChunk(fileId string, offset int64) *filer_pb.FileChunk { + fid, _ := filer_pb.ToFileIdObject(fileId) return &filer_pb.FileChunk{ FileId: fileId, Offset: offset, @@ -41,6 +42,7 @@ func (uploadResult *UploadResult) ToPbFileChunk(fileId string, offset int64) *fi ETag: uploadResult.ETag, CipherKey: uploadResult.CipherKey, IsCompressed: uploadResult.Gzip > 0, + Fid: fid, } } @@ -84,7 +86,7 @@ func doUpload(uploadUrl string, filename string, cipher bool, reader io.Reader, } func retriedUploadData(uploadUrl string, filename string, cipher bool, data []byte, isInputCompressed bool, mtype string, pairMap map[string]string, jwt security.EncodedJwt) (uploadResult *UploadResult, err error) { - for i:=0; i< 3; i++ { + for i := 0; i < 3; i++ { uploadResult, err = doUploadData(uploadUrl, filename, cipher, data, isInputCompressed, mtype, pairMap, jwt) if err == nil { return |
