Ejemplo n.º 1
0
        public IActionResult ImageForCarousel()
        {
            var carouselFolderPath = _pathHelper.GetPathToCarouselFolder();
            var filesPath          = Directory.GetFiles(carouselFolderPath);
            var img = filesPath
                      .Where(filePath => Path.GetExtension(filePath) == ".jpg")
                      .ToList();

            return(Json(img));
        }