public ResponseFile(Stream fileContent, string fileDownloadName, string contentType = null) { FileContentsStream = fileContent; FileDownloadName = fileDownloadName; ContentType = Strings.CoalesceEmpty(contentType, Mime.Type(FileDownloadName)); StreamLength = fileContent.Length; }
public ResponseFile(string fileContent, string fileDownloadName) { FileContents = fileContent; FileDownloadName = fileDownloadName; ContentType = Mime.Type(FileDownloadName); Length = fileContent.Length; }
public ResponseFile( string fileContent, string fileDownloadName, string contentType = null, string encoding = null) { FileContents = fileContent; FileDownloadName = fileDownloadName; ContentType = Strings.CoalesceEmpty(contentType, Mime.Type(FileDownloadName)); Length = fileContent.Length; Encoding = encoding; }