StaticFileOptions StaticFileOptions StaticFileOptions Class

Definition

Options for serving static files

public class StaticFileOptions : Microsoft.AspNetCore.StaticFiles.Infrastructure.SharedOptionsBase
type StaticFileOptions = class
    inherit SharedOptionsBase
Public Class StaticFileOptions
Inherits SharedOptionsBase
Inheritance
StaticFileOptionsStaticFileOptionsStaticFileOptions

Constructors

StaticFileOptions() StaticFileOptions() StaticFileOptions()

Defaults to all request paths

StaticFileOptions(SharedOptions) StaticFileOptions(SharedOptions) StaticFileOptions(SharedOptions)

Defaults to all request paths

Properties

ContentTypeProvider ContentTypeProvider ContentTypeProvider

Used to map files to content-types.

DefaultContentType DefaultContentType DefaultContentType

The default content type for a request if the ContentTypeProvider cannot determine one. None is provided by default, so the client must determine the format themselves. http://www.w3.org/Protocols/rfc2616/rfc2616-sec7.html#sec7

FileProvider FileProvider FileProvider

The file system used to locate resources

(Inherited from SharedOptionsBase)
OnPrepareResponse OnPrepareResponse OnPrepareResponse

Called after the status code and headers have been set, but before the body has been written. This can be used to add or change the response headers.

RequestPath RequestPath RequestPath

The relative request path that maps to static resources.

(Inherited from SharedOptionsBase)
ServeUnknownFileTypes ServeUnknownFileTypes ServeUnknownFileTypes

If the file is not a recognized content-type should it be served? Default: false.

SharedOptions SharedOptions SharedOptions

Options common to several middleware components

(Inherited from SharedOptionsBase)

Applies to