From 19caeb7b02307017ca19e26540ec95bf85b71d91 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Sun, 6 Jun 2021 20:57:03 -0700 Subject: [PATCH] fix writing the small file --- weed/server/filer_server_handlers_write_upload.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weed/server/filer_server_handlers_write_upload.go b/weed/server/filer_server_handlers_write_upload.go index f2b996ec5..cc351d718 100644 --- a/weed/server/filer_server_handlers_write_upload.go +++ b/weed/server/filer_server_handlers_write_upload.go @@ -58,7 +58,7 @@ func (fs *FilerServer) uploadReaderToChunks(w http.ResponseWriter, r *http.Reque if dataSize < fs.option.SaveToFilerLimit || strings.HasPrefix(r.URL.Path, filer.DirectoryEtcRoot) && dataSize < 4*1024 { chunkOffset += dataSize smallContent = make([]byte, dataSize) - bytesBuffer.Write(smallContent) + bytesBuffer.Read(smallContent) break } }