C# Class Affecto.WebApi.Toolkit.Responses.FileResponse

Http response message for returning files in a way browsers will recognize (and prompt user for open/download)
Inheritance: System.Net.Http.HttpResponseMessage
ファイルを表示 Open project: affecto/dotnet-WebApi.Toolkit

Public Methods

Method Description
FileResponse ( Stream content, string filename ) : System.IO

Initializes new FileResponse. Tries to parse mime-type from filename.

FileResponse ( Stream content, string filename, string contentType ) : System.IO

Initializes new FileResponse

Method Details

FileResponse() public method

Initializes new FileResponse. Tries to parse mime-type from filename.
public FileResponse ( Stream content, string filename ) : System.IO
content System.IO.Stream File content
filename string File name, should include extension for mime parsing to work.
return System.IO

FileResponse() public method

Initializes new FileResponse
public FileResponse ( Stream content, string filename, string contentType ) : System.IO
content System.IO.Stream File content
filename string File name
contentType string Mime content type for file
return System.IO