aboutsummaryrefslogtreecommitdiff
path: root/weed/server/filer_server_handlers_write_cipher.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/server/filer_server_handlers_write_cipher.go')
-rw-r--r--weed/server/filer_server_handlers_write_cipher.go12
1 files changed, 1 insertions, 11 deletions
diff --git a/weed/server/filer_server_handlers_write_cipher.go b/weed/server/filer_server_handlers_write_cipher.go
index 2dcf4b4e3..bea72b2c1 100644
--- a/weed/server/filer_server_handlers_write_cipher.go
+++ b/weed/server/filer_server_handlers_write_cipher.go
@@ -46,17 +46,7 @@ func (fs *FilerServer) encrypt(ctx context.Context, w http.ResponseWriter, r *ht
}
// Save to chunk manifest structure
- fileChunks := []*filer_pb.FileChunk{
- {
- FileId: fileId,
- Offset: 0,
- Size: uint64(uploadResult.Size),
- Mtime: time.Now().UnixNano(),
- ETag: uploadResult.Md5,
- CipherKey: uploadResult.CipherKey,
- IsGzipped: uploadResult.Gzip > 0,
- },
- }
+ fileChunks := []*filer_pb.FileChunk{uploadResult.ToPbFileChunk(fileId, 0)}
// fmt.Printf("uploaded: %+v\n", uploadResult)