Skip to content

Type Alias: FileResultOptions ​

FileResultOptions = object

How a FileResult is sent.

Properties ​

contentType? ​

optional contentType?: string

The content type, inferred from the file's or the attachment's name when omitted.


etag? ​

optional etag?: string

The content's entity tag, sent quoted in ETag: a request whose If-None-Match matches it gets a 304 response without content.


filename? ​

optional filename?: string

The name to send the file under, as an attachment (Content-Disposition: attachment); it is displayed inline when omitted.


headers? ​

optional headers?: Record<string, string>

Other response headers.

Released under the MIT License.