diff --git a/weed/server/filer_grpc_server.go b/weed/server/filer_grpc_server.go index 67d4aaaaf..d56d36c38 100644 --- a/weed/server/filer_grpc_server.go +++ b/weed/server/filer_grpc_server.go @@ -144,8 +144,15 @@ func (fs *FilerServer) CreateEntry(ctx context.Context, req *filer_pb.CreateEntr return &filer_pb.CreateEntryResponse{}, fmt.Errorf("CreateEntry cleanupChunks %s %s: %v", req.Directory, req.Entry.Name, err2) } + so, err := fs.detectStorageOption(string(util.NewFullPath(req.Directory, req.Entry.Name)), "", "", 0, "", "", "", "") + if err != nil { + return nil, err + } newEntry := filer.FromPbEntry(req.Directory, req.Entry) newEntry.Chunks = chunks + newEntry.TtlSec = so.TtlSeconds + newEntry.Collection = so.Collection + newEntry.DiskType = so.DiskType createErr := fs.filer.CreateEntry(ctx, newEntry, req.OExcl, req.IsFromOtherCluster, req.Signatures, req.SkipCheckParentDirectory)