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?
Instead of HttpFileBase
, you've to use IFormFile
from Microsoft.AspNetCore.Http
(install NuGet package if you haven't.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With