|
|
@ -9,12 +9,10 @@ import ( |
|
|
|
"io" |
|
|
|
"net/http" |
|
|
|
"strconv" |
|
|
|
"strings" |
|
|
|
"sync" |
|
|
|
"sync/atomic" |
|
|
|
"time" |
|
|
|
|
|
|
|
"github.com/seaweedfs/seaweedfs/weed/filer" |
|
|
|
"github.com/seaweedfs/seaweedfs/weed/glog" |
|
|
|
"github.com/seaweedfs/seaweedfs/weed/operation" |
|
|
|
"github.com/seaweedfs/seaweedfs/weed/pb/filer_pb" |
|
|
@ -83,7 +81,7 @@ func (fs *FilerServer) uploadReaderToChunks(w http.ResponseWriter, r *http.Reque |
|
|
|
break |
|
|
|
} |
|
|
|
if chunkOffset == 0 && !isAppend { |
|
|
|
if dataSize < fs.option.SaveToFilerLimit || strings.HasPrefix(r.URL.Path, filer.DirectoryEtcRoot) { |
|
|
|
if dataSize < fs.option.SaveToFilerLimit { |
|
|
|
chunkOffset += dataSize |
|
|
|
smallContent = make([]byte, dataSize) |
|
|
|
bytesBuffer.Read(smallContent) |
|
|
|