c# - Web Api model binding with file attachments -
i have model named event.
public class event { public int id {get; set;} public string name {get; set;} } and use event in controller action method.
// post api/events [httppost] public createeventresponse post(event request) { return new createeventresponse { id = 123 }; } this works.
but later need attach file event while saving.
i selecting upload file fiddler, content type changed multipart/form-data;
but time event not binding model binder in controller action.



Comments
Post a Comment