Beispiel #1
0
        public async Task <IActionResult> DeleteMediaFile()
        {
            try
            {
                var mediaItemPath = HttpUtility.UrlDecode(HttpContext.Request.Form["src"]);
                await _attachedMediaToContentItemService.DeleteAttachedMediaItem(mediaItemPath);

                return(Json(true));
            }
            catch (Exception e)
            {
                return(Json(e));
            }
        }
        public async Task <IActionResult> DeleteMediaFromContentItemStorage()
        {
            try
            {
                string imgPath = HttpUtility.UrlDecode(HttpContext.Request.Form["src"]);
                await _attachedMediaToContentItemService.DeleteAttachedMediaItem(imgPath);

                //   FroalaEditor.Image.Delete(HttpContext.Request.Form["src"]);
                return(Json(true));
            }
            catch (Exception e)
            {
                return(Json(e));
            }
        }