Exemple #1
0
 public JsonResult DeleteFile(int id)
 {
     try
     {
         var app   = new ServiceReference.ContractClient();
         var image = app.GetImageById(id);
         //Delete file from the file system
         ImageHelper.DeleteImage(image.Url);
         app.DeleteImage(id);
         return(Json(new { Result = "OK" }));
     }
     catch (Exception ex)
     {
         return(Json(new { Result = "ERROR", Message = ex.Message }));
     }
 }