fix writing the small file

This commit is contained in:
Chris Lu 2021-06-06 20:57:03 -07:00
parent bb45dea15a
commit 19caeb7b02

View file

@ -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
}
}