diff options
Diffstat (limited to 'weed/operation/upload_content.go')
| -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 |
