aboutsummaryrefslogtreecommitdiff
path: root/weed/filer2/filer_notify_append.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/filer2/filer_notify_append.go')
-rw-r--r--weed/filer2/filer_notify_append.go11
1 files changed, 1 insertions, 10 deletions
diff --git a/weed/filer2/filer_notify_append.go b/weed/filer2/filer_notify_append.go
index efe7b0213..af291058c 100644
--- a/weed/filer2/filer_notify_append.go
+++ b/weed/filer2/filer_notify_append.go
@@ -38,16 +38,7 @@ func (f *Filer) appendToFile(targetFile string, data []byte) error {
}
// append to existing chunks
- chunk := &filer_pb.FileChunk{
- FileId: assignResult.Fid,
- Offset: offset,
- Size: uint64(uploadResult.Size),
- Mtime: time.Now().UnixNano(),
- ETag: uploadResult.ETag,
- CipherKey: uploadResult.CipherKey,
- IsGzipped: uploadResult.Gzip > 0,
- }
- entry.Chunks = append(entry.Chunks, chunk)
+ entry.Chunks = append(entry.Chunks, uploadResult.ToPbFileChunk(assignResult.Fid, offset))
// update the entry
err = f.CreateEntry(context.Background(), entry, false)