From 65ff7198feb0725346e3c1dcf7eaab7c34140bc0 Mon Sep 17 00:00:00 2001 From: chrislu Date: Sat, 20 Aug 2022 22:37:24 -0700 Subject: [PATCH] adjust type --- weed/server/webdav_server.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/weed/server/webdav_server.go b/weed/server/webdav_server.go index 3233f0b39..eaa373dd0 100644 --- a/weed/server/webdav_server.go +++ b/weed/server/webdav_server.go @@ -1,7 +1,6 @@ package weed_server import ( - "bytes" "context" "fmt" "io" @@ -432,7 +431,7 @@ func (f *WebDavFile) Write(buf []byte) (int, error) { f.bufWriter.FlushFunc = func(data []byte, offset int64) (flushErr error) { var chunk *filer_pb.FileChunk - chunk, flushErr = f.saveDataAsChunk(bytes.NewReader(data), f.name, offset) + chunk, flushErr = f.saveDataAsChunk(util.NewBytesReader(data), f.name, offset) if flushErr != nil { return fmt.Errorf("%s upload result: %v", f.name, flushErr)