Create(content, contentType, status, headers) Create(content, contentType, status, headers) Create(content, contentType, status, headers) Create(content, contentType, status, headers, buffered) Css(content, status, headers) Css(content, status, headers) Css(content, status, headers) Css(content, status, headers, buffered) File(filePath, contentType, maxAge, ifModifiedSince) Html(content, status, headers) Html(content, status, headers) Html(content, status, headers) Html(content, status, headers, buffered) Html(content, status, headers, buffered) Json(content, status, headers) PlainText(content, status, headers, buffered)
Legend Class Struct Enum Interface Delegate | Constructor Method Property Event Field |
| Static method: HttpResponseContent File(string, string, int?, DateTime?)Declarationpublic static HttpResponseContent File(
string filePath,
string contentType = null,
int? maxAge = 3600,
DateTime? ifModifiedSince = null
) Summary
Returns the specified file from the local file system using the specified MIME content type to the client. Parametersstring | filePath |
Full path and filename of the file to return. | string | contentType |
MIME type to use in the Content-Type header. If null (the default), the first kilobyte is looked at to
choose between the plaintext and the octet-stream content type. | int? | maxAge |
Specifies the value for the CacheControl max-age header on the file served. Set to null to prevent this
header being sent. | DateTime? | ifModifiedSince |
If specified, a 304 Not Modified will be served if the file's last modified timestamp is at or before this
time. |
|