Reputation: 1306
I want to design a class that have HttpPostedFileBase
based property like,
public HttpPostedFileBase picture;
I am using IFormFile
and using Microsoft.AspNet.Http
;
the Code looks like this:
using Microsoft.AspNet.Http;
namespace design.Model
{
public class gallery
{
public IFormFile picture;
}
}
and it gives an error at using Microsoft.AspNet.Http
line. How can this be solved?
Upvotes: 4
Views: 13918
Reputation: 5301
Instead of HttpFileBase
, you've to use IFormFile
from Microsoft.AspNetCore.Http
(install NuGet package if you haven't.)
Upvotes: 7