Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more

Class MediaOptions

EPiServer media files options

Inheritance
System.Object
MediaOptions
Namespace: EPiServer.Web
Assembly: EPiServer.Cms.AspNetCore.Routing.dll
Version: 12.0.3
Syntax
[Options(ConfigurationSection = "Cms")]
public class MediaOptions : Object

Constructors

MediaOptions()

Declaration
public MediaOptions()

Fields

DefaultContentType

The default content type for a request if the ContentType cannot be determined from context.

Declaration
public string DefaultContentType
Field Value
Type Description
System.String
Remarks

Default value is 'application/octet-stream'

Properties

CacheControl

Gets the cache control settings. Defaults to "auto"

Declaration
public string CacheControl { get; set; }
Property Value
Type Description
System.String

ExpirationTime

Gets the cache expiration time.

Declaration
public TimeSpan ExpirationTime { get; set; }
Property Value
Type Description
System.TimeSpan

PreProcessors

Specifies instances of IStaticFilePreProcessor that are called during a media response.

Declaration
public IList<Type> PreProcessors { get; }
Property Value
Type Description
System.Collections.Generic.IList<System.Type>

Methods

AddPreProcessor<T>()

Adds a pre processor of T.

Declaration
public MediaOptions AddPreProcessor<T>()
    where T : IStaticFilePreProcessor
Returns
Type Description
MediaOptions

The media options

Type Parameters
Name Description
T

The type of pre processor to add

Extension Methods