This commit is contained in:
Chris Lu
2021-03-30 21:07:34 -07:00
parent e79e2ddeed
commit b5880334fc
4 changed files with 116 additions and 101 deletions

View File

@@ -52,7 +52,7 @@ func (fs *FilerServer) assignNewFileInfo(so *operation.StorageOption) (fileId, u
return
}
func (fs *FilerServer) PostHandler(w http.ResponseWriter, r *http.Request) {
func (fs *FilerServer) PostHandler(w http.ResponseWriter, r *http.Request, contentLength int64) {
ctx := context.Background()
@@ -66,7 +66,7 @@ func (fs *FilerServer) PostHandler(w http.ResponseWriter, r *http.Request) {
query.Get("rack"),
)
fs.autoChunk(ctx, w, r, so)
fs.autoChunk(ctx, w, r, contentLength, so)
util.CloseRequest(r)
}