mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-12-19 10:49:19 +08:00
refactoring
some previous chunk etag was using md5, which should be wrong.
This commit is contained in:
@@ -418,17 +418,7 @@ func (f *WebDavFile) Write(buf []byte) (int, error) {
|
||||
return 0, fmt.Errorf("upload result: %v", uploadResult.Error)
|
||||
}
|
||||
|
||||
chunk := &filer_pb.FileChunk{
|
||||
FileId: fileId,
|
||||
Offset: f.off,
|
||||
Size: uint64(len(buf)),
|
||||
Mtime: time.Now().UnixNano(),
|
||||
ETag: uploadResult.ETag,
|
||||
CipherKey: uploadResult.CipherKey,
|
||||
IsGzipped: uploadResult.Gzip > 0,
|
||||
}
|
||||
|
||||
f.entry.Chunks = append(f.entry.Chunks, chunk)
|
||||
f.entry.Chunks = append(f.entry.Chunks, uploadResult.ToPbFileChunk(fileId, f.off))
|
||||
|
||||
err = f.fs.WithFilerClient(func(client filer_pb.SeaweedFilerClient) error {
|
||||
f.entry.Attributes.Mtime = time.Now().Unix()
|
||||
|
||||
Reference in New Issue
Block a user