What is the best way to resize an uploaded image in MVC 6? I would like to save several options for the image (for example, small, large, etc.), in order to be able to choose what will be displayed later.
Here is my code for the action.
[HttpPost] public async Task<IActionResult> UploadPhoto() { if (Request.Form.Files.Count != 1) return new HttpStatusCodeResult((int)HttpStatusCode.BadRequest); IFormFile file = Request.Form.Files[0];
image asp.net-core-mvc
Sergey Kandaurov
source share