|
|
@ -87,6 +87,7 @@ func (fs *FilerServer) PostHandler(w http.ResponseWriter, r *http.Request, conte |
|
|
|
query.Get("dataCenter"), |
|
|
|
query.Get("rack"), |
|
|
|
query.Get("dataNode"), |
|
|
|
query.Get("saveInside"), |
|
|
|
) |
|
|
|
if err != nil { |
|
|
|
if err == ErrReadOnly { |
|
|
@ -103,6 +104,10 @@ func (fs *FilerServer) PostHandler(w http.ResponseWriter, r *http.Request, conte |
|
|
|
so.DiskType = fs.option.DiskType |
|
|
|
} |
|
|
|
|
|
|
|
if strings.HasPrefix(r.URL.Path, "/etc") { |
|
|
|
so.SaveInside = true |
|
|
|
} |
|
|
|
|
|
|
|
if query.Has("mv.from") { |
|
|
|
fs.move(ctx, w, r, so) |
|
|
|
} else { |
|
|
@ -246,7 +251,7 @@ func (fs *FilerServer) detectStorageOption(requestURI, qCollection, qReplication |
|
|
|
}, nil |
|
|
|
} |
|
|
|
|
|
|
|
func (fs *FilerServer) detectStorageOption0(requestURI, qCollection, qReplication string, qTtl string, diskType string, fsync string, dataCenter, rack, dataNode string) (*operation.StorageOption, error) { |
|
|
|
func (fs *FilerServer) detectStorageOption0(requestURI, qCollection, qReplication string, qTtl string, diskType string, fsync string, dataCenter, rack, dataNode, saveInside string) (*operation.StorageOption, error) { |
|
|
|
|
|
|
|
ttl, err := needle.ReadTTL(qTtl) |
|
|
|
if err != nil { |
|
|
@ -260,6 +265,11 @@ func (fs *FilerServer) detectStorageOption0(requestURI, qCollection, qReplicatio |
|
|
|
} else if fsync == "true" { |
|
|
|
so.Fsync = true |
|
|
|
} |
|
|
|
if saveInside == "true" { |
|
|
|
so.SaveInside = true |
|
|
|
} else { |
|
|
|
so.SaveInside = false |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return so, err |
|
|
|