Reputation: 3363
I have to fill out following model in a view:
IEnumerable<File> Photos
IEnumerable<File> Logos
IEnumerable<File> Videos
How can send multiple files with one POST to a controller action?
Upvotes: 0
Views: 24
Reputation: 3966
what about this :
[HttpPost]
public ActionResult Post(Class Model, IEnumerable<HttpPostedFileBase> Photos, IEnumerable<HttpPostedFileBase> Logos, IEnumerable<HttpPostedFileBase> Videos)
{
// proceed
}
where Photos, Logos & Videos should names of ur controls (input type file)
Upvotes: 1