From 41be7a4c8fac9c9455e1804f5f4f057cc52d3180 Mon Sep 17 00:00:00 2001
From: Chris Lu <chris.lu@gmail.com>
Date: Fri, 25 Sep 2020 12:02:06 -0700
Subject: [PATCH] filer: upload also set file size

ensure works same as fuse mount
---
 weed/server/filer_server_handlers_write_autochunk.go | 1 +
 1 file changed, 1 insertion(+)

diff --git a/weed/server/filer_server_handlers_write_autochunk.go b/weed/server/filer_server_handlers_write_autochunk.go
index 61011fc20..2b37e3c5d 100644
--- a/weed/server/filer_server_handlers_write_autochunk.go
+++ b/weed/server/filer_server_handlers_write_autochunk.go
@@ -167,6 +167,7 @@ func (fs *FilerServer) saveMetaData(ctx context.Context, r *http.Request, fileNa
 			TtlSec:      ttlSec,
 			Mime:        contentType,
 			Md5:         md5bytes,
+			FileSize:    uint64(chunkOffset),
 		},
 		Chunks: fileChunks,
 	}