Ejemplo n.º 1
0
 public IActionResult EditCarImage(EditImageViewModel editImageView)
 {
     if (ModelState.IsValid)
     {
         try
         {
             string imagePath = _carImgService.EditCarImage(editImageView);
             if (!string.IsNullOrEmpty(imagePath))
             {
                 return(Ok(new { Path = imagePath }));
             }
             return(Ok(new { Path = "" }));
         }
         catch
         {
             return(View());
         }
     }
     return(View());
 }