aboutsummaryrefslogtreecommitdiff
path: root/weed/filer2/filechunks.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-04-08 09:13:26 -0700
committerChris Lu <chris.lu@gmail.com>2020-04-08 09:13:26 -0700
commitdc08e4098ffbb3d7d95c9decac7407e67349baa9 (patch)
tree3bbd20e254a7fc2ce8e372c29a066bc326348831 /weed/filer2/filechunks.go
parentec2eb8bc4804f9b880f256a55e3cbfc0923b6a29 (diff)
downloadseaweedfs-dc08e4098ffbb3d7d95c9decac7407e67349baa9.tar.xz
seaweedfs-dc08e4098ffbb3d7d95c9decac7407e67349baa9.zip
add etag only for PUT or large chunked uploads
Diffstat (limited to 'weed/filer2/filechunks.go')
-rw-r--r--weed/filer2/filechunks.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/weed/filer2/filechunks.go b/weed/filer2/filechunks.go
index e8e4c305b..48eaeea27 100644
--- a/weed/filer2/filechunks.go
+++ b/weed/filer2/filechunks.go
@@ -22,14 +22,14 @@ func TotalSize(chunks []*filer_pb.FileChunk) (size uint64) {
func ETag(entry *filer_pb.Entry) (etag string) {
if entry.Attributes == nil || entry.Attributes.Md5 == nil {
- ETagChunks(entry.Chunks)
+ return ETagChunks(entry.Chunks)
}
return fmt.Sprintf("%x", entry.Attributes.Md5)
}
func ETagEntry(entry *Entry) (etag string) {
if entry.Attr.Md5 == nil {
- ETagChunks(entry.Chunks)
+ return ETagChunks(entry.Chunks)
}
return fmt.Sprintf("%x", entry.Attr.Md5)
}