Skip to content
Simplify.Web multipart form model binder
C#
Branch: master
Clone or download
Pull request Compare This branch is 20 commits ahead, 1 commit behind i4004:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/ISSUE_TEMPLATE
Simplify.Web.Multipart
.gitignore
LICENSE
README.md
Simplify.Web.Multipart.sln
Simplify.Web.Multipart.sln.DotSettings
appveyor.yml

README.md

Simplify.Web.Multipart

Nuget Version Nuget Download AppVeyor branch Libraries.io dependency status for latest release CodeFactor Grade Platform Dependabot Status PRs Welcome

Simplify.Web.Multipart is a package which provides multipart form view model and model binder for Simplify.Web web-framework.

Quick start

Registering binder

public void Configuration(IApplicationBuilder app)
{
    ...
    HttpModelHandler.RegisterModelBinder<HttpMultipartFormModelBinder>();
    ...
    app.UseSimplifyWeb();
}

public void ConfigureServices(IServiceCollection services)
{
    ...
    DIContainer.Current.RegisterHttpMultipartFormModelBinder();
    ...
}

Getting files from client

Multipart files will be deserialized to the controller model on first model access

public class MyController : Controller<MultipartViewModel>
{
    public override ControllerResponse Invoke()
    {
        Model.Files
    }
}
You can’t perform that action at this time.