This is how I save images.
[HttpPost]
public ActionResult Create(HttpPostedFileBase file)
{
if (file != null)
{
var extension = Path.GetExtension(file.FileName);
var fileName = Guid.NewGuid().ToString() + extension;
var path = Path.Combine(Server.MapPath("~/Content/Photos"), fileName);
file.SaveAs(path);
//...
}
}
I don't want to display the image from that location. I want rather to read it first for further processing.
How do I read the image file in that case?