C# Class Daniel15.Web.Areas.Gallery.Controllers.GalleryController

Inheritance: Microsoft.AspNetCore.Mvc.Controller
Exibir arquivo Open project: Daniel15/Website

Public Methods

Method Description
GalleryController ( IGalleryConfiguration galleryConfig ) : System

Initializes a new instance of the GalleryController class.

Private Methods

Method Description
BuildGalleryModel ( Shared gallery, string path, Daniel15.Web.Areas.Gallery.Models.GalleryFileModel type ) : Daniel15.Web.Areas.Gallery.Models.GalleryFileModel

Builds a gallery item model from the specified path

Directory ( Shared gallery, string path, string fullPath ) : Microsoft.AspNetCore.Mvc.ActionResult

Displays a listing of gallery images in the specified path

Download ( string fullPath ) : Microsoft.AspNetCore.Mvc.ActionResult

Returns the specified file. This is just a fallback - The directory should be configured in Nginx or IIS and served directly.

GetAndValidateFullPath ( Shared gallery, string path ) : string

Converts the specified relative path to an absolute file system path, and ensure it's not outside the gallery directory.

GetGallery ( string name ) : Shared.Configuration.Gallery

Gets the specified gallery from the configuration

ImageUrl ( Shared gallery, string path ) : string

Get the URL to the specified gallery image

Index ( string galleryName, string path ) : Microsoft.AspNetCore.Mvc.ActionResult
Thumbnail ( string galleryName, string path ) : Microsoft.AspNetCore.Mvc.ActionResult
ThumbnailUrl ( Shared gallery, string path ) : string

Get the URL to the thumbnail for the specified image

Method Details

GalleryController() public method

Initializes a new instance of the GalleryController class.
public GalleryController ( IGalleryConfiguration galleryConfig ) : System
galleryConfig IGalleryConfiguration The gallery configuration.
return System