Class FileDownloadHandler
Downloads local files or files from portal content file system.
Be careful with this handler as the incorrect root setup may allow users to download system-internal files
Inheritance
System.Object
FileDownloadHandler
Implements
System.IDisposable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Assembly: Azos.Wave.dll
Syntax
public class FileDownloadHandler : WorkHandler, IDisposable, IApplicationComponent, INamed, IOrdered
Constructors
FileDownloadHandler(WorkDispatcher, IConfigSectionNode)
Declaration
protected FileDownloadHandler(WorkDispatcher dispatcher, IConfigSectionNode confNode)
Parameters
FileDownloadHandler(WorkDispatcher, String, Int32, WorkMatch)
Declaration
protected FileDownloadHandler(WorkDispatcher dispatcher, string name, int order, WorkMatch match)
Parameters
Fields
CONFIG_CACHE_CONTROL_SECTION
Declaration
public const string CONFIG_CACHE_CONTROL_SECTION = "cache-control"
Field Value
Type |
Description |
System.String |
|
INVALID_ROOT
Declaration
public const string INVALID_ROOT = "Invalid-Root-Path:\\"
Field Value
Type |
Description |
System.String |
|
VAR_ATTACHMENT
Declaration
public const string VAR_ATTACHMENT = "attachment"
Field Value
Type |
Description |
System.String |
|
VAR_CHUNKED
Declaration
public const string VAR_CHUNKED = "chunked"
Field Value
Type |
Description |
System.String |
|
VAR_FILE_PATH
Declaration
public const string VAR_FILE_PATH = "filePath"
Field Value
Type |
Description |
System.String |
|
Properties
CacheControl
Declaration
public CacheControl CacheControl { get; set; }
Property Value
RootPath
Specifies local root path
Declaration
public string RootPath { get; set; }
Property Value
Type |
Description |
System.String |
|
Throw
Specifies whether the handler generates simple 404 text or throws
Declaration
public bool Throw { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
UsePortalHub
When true, downloads files from PortalHub.ContentFileSystem for selected portal
Declaration
public bool UsePortalHub { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
VersionSegmentPrefix
When set indicates the case-insensitive prefix of a path segment that should be ignored by the file system.
Version prefixes are used for attaching a surrogate path "folder" that makes resource differ based on their content.
For example when prefix is "@", path '/static/img/@767868768768/picture.png' resolves to actual '/static/img/picture.png'
Declaration
public string VersionSegmentPrefix { get; set; }
Property Value
Type |
Description |
System.String |
|
Methods
DoHandleWork(WorkContext)
Declaration
protected override void DoHandleWork(WorkContext work)
Parameters
Overrides
Implements
System.IDisposable
Extension Methods