Controller::File Method
Visual Studio 2010
Creates a FileContentResult object.
This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.
| Name | Description | |
|---|---|---|
|
File(array<Byte>, String) | Creates a FileContentResult object by using the file contents and file type. |
|
File(Stream, String) | Creates a FileStreamResult object by using the Stream object and content type. |
|
File(String, String) | Creates a FilePathResult object by using the file name and the content type. |
|
File(array<Byte>, String, String) | Creates a FileContentResult object by using the file contents, content type, and the destination file name. |
|
File(Stream, String, String) | Creates a FileStreamResult object using the Stream object, the content type, and the target file name. |
|
File(String, String, String) | Creates a FilePathResult object by using the file name, the content type, and the file download name. |
The File() helper method provides support for returning the contents of a file. The MediaTypeNames class can be used to get the MIME type for a specific file name extension.
Community Additions
ADD
Show: