C# Class CkanDotNet.Web.Controllers.DownloadProxyController

Inheritance: Controller
Show file Open project: opencolorado/.NET-Wrapper-for-CKAN-API

Public Methods

Method Description
Index ( string path ) : System.Web.Mvc.ActionResult

Provides a reverse proxy to content that is provided via the catalog. Provided to allow capturing of analytics for downloads that originate from the master catalog website while also simplifying the setup by allowing download links to go through the catalog web application. GET: /content/{path}

Private Methods

Method Description
MimeType ( string filename ) : string

Get the mime type of a file

StreamDownload ( string path ) : void

Stream the resource to the client

StreamFromFileResource ( System.Web.HttpContextWrapper context, Uri uri ) : long

Stream a file from a file resource.

StreamFromHttpResource ( System.Web.HttpContextWrapper context, Uri uri ) : long

Stream a file from an HTTP resource.

TrackDownloadEvent ( string path, System.Web.HttpContextWrapper context, long bytes ) : void

Track the download event

Method Details

Index() public method

Provides a reverse proxy to content that is provided via the catalog. Provided to allow capturing of analytics for downloads that originate from the master catalog website while also simplifying the setup by allowing download links to go through the catalog web application. GET: /content/{path}
public Index ( string path ) : System.Web.Mvc.ActionResult
path string
return System.Web.Mvc.ActionResult