Aracılığıyla paylaş


Controller.File Yöntem

Tanım

Aşırı Yüklemeler

File(Byte[], String)

Dosya içeriğini ve dosya türünü kullanarak bir FileContentResult nesnesi oluşturur.

File(Stream, String)

Stream nesnesini ve içerik türünü kullanarak bir FileStreamResult nesnesi oluşturur.

File(String, String)

Dosya adını ve içerik türünü kullanarak bir FilePathResult nesnesi oluşturur.

File(Byte[], String, String)

Dosya içeriğini, içerik türünü ve hedef dosya adını kullanarak bir FileContentResult nesnesi oluşturur.

File(Stream, String, String)

Stream nesnesini, içerik türünü ve hedef dosya adını kullanarak bir FileStreamResult nesnesi oluşturur.

File(String, String, String)

Dosya adını, içerik türünü ve dosya indirme adını kullanarak bir FilePathResult nesnesi oluşturur.

File(Byte[], String)

Dosya içeriğini ve dosya türünü kullanarak bir FileContentResult nesnesi oluşturur.

protected internal System.Web.Mvc.FileContentResult File (byte[] fileContents, string contentType);
member this.File : byte[] * string -> System.Web.Mvc.FileContentResult
Protected Friend Function File (fileContents As Byte(), contentType As String) As FileContentResult

Parametreler

fileContents
Byte[]

Yanıta gönderilecek ikili içerik.

contentType
String

İçerik türü (MIME türü).

Döndürülenler

Dosya içeriği sonuç nesnesi.

Şunlara uygulanır

File(Stream, String)

Stream nesnesini ve içerik türünü kullanarak bir FileStreamResult nesnesi oluşturur.

protected internal System.Web.Mvc.FileStreamResult File (System.IO.Stream fileStream, string contentType);
member this.File : System.IO.Stream * string -> System.Web.Mvc.FileStreamResult
Protected Friend Function File (fileStream As Stream, contentType As String) As FileStreamResult

Parametreler

fileStream
Stream

Yanıta gönderilecek akış.

contentType
String

İçerik türü (MIME türü).

Döndürülenler

Dosya içeriği sonuç nesnesi.

Şunlara uygulanır

File(String, String)

Dosya adını ve içerik türünü kullanarak bir FilePathResult nesnesi oluşturur.

protected internal System.Web.Mvc.FilePathResult File (string fileName, string contentType);
member this.File : string * string -> System.Web.Mvc.FilePathResult
Protected Friend Function File (fileName As String, contentType As String) As FilePathResult

Parametreler

fileName
String

Yanıta gönderilecek dosyanın yolu.

contentType
String

İçerik türü (MIME türü).

Döndürülenler

Dosya akışı sonuç nesnesi.

Şunlara uygulanır

File(Byte[], String, String)

Dosya içeriğini, içerik türünü ve hedef dosya adını kullanarak bir FileContentResult nesnesi oluşturur.

protected internal virtual System.Web.Mvc.FileContentResult File (byte[] fileContents, string contentType, string fileDownloadName);
abstract member File : byte[] * string * string -> System.Web.Mvc.FileContentResult
override this.File : byte[] * string * string -> System.Web.Mvc.FileContentResult
Protected Friend Overridable Function File (fileContents As Byte(), contentType As String, fileDownloadName As String) As FileContentResult

Parametreler

fileContents
Byte[]

Yanıta gönderilecek ikili içerik.

contentType
String

İçerik türü (MIME türü).

fileDownloadName
String

Tarayıcıda görüntülenen dosya indirme iletişim kutusunda kullanılacak dosya adı.

Döndürülenler

Dosya içeriği sonuç nesnesi.

Şunlara uygulanır

File(Stream, String, String)

Stream nesnesini, içerik türünü ve hedef dosya adını kullanarak bir FileStreamResult nesnesi oluşturur.

protected internal virtual System.Web.Mvc.FileStreamResult File (System.IO.Stream fileStream, string contentType, string fileDownloadName);
abstract member File : System.IO.Stream * string * string -> System.Web.Mvc.FileStreamResult
override this.File : System.IO.Stream * string * string -> System.Web.Mvc.FileStreamResult
Protected Friend Overridable Function File (fileStream As Stream, contentType As String, fileDownloadName As String) As FileStreamResult

Parametreler

fileStream
Stream

Yanıta gönderilecek akış.

contentType
String

İçerik türü (MIME türü)

fileDownloadName
String

Tarayıcıda görüntülenen dosya indirme iletişim kutusunda kullanılacak dosya adı.

Döndürülenler

Dosya akışı sonuç nesnesi.

Şunlara uygulanır

File(String, String, String)

Dosya adını, içerik türünü ve dosya indirme adını kullanarak bir FilePathResult nesnesi oluşturur.

protected internal virtual System.Web.Mvc.FilePathResult File (string fileName, string contentType, string fileDownloadName);
abstract member File : string * string * string -> System.Web.Mvc.FilePathResult
override this.File : string * string * string -> System.Web.Mvc.FilePathResult
Protected Friend Overridable Function File (fileName As String, contentType As String, fileDownloadName As String) As FilePathResult

Parametreler

fileName
String

Yanıta gönderilecek dosyanın yolu.

contentType
String

İçerik türü (MIME türü).

fileDownloadName
String

Tarayıcıda görüntülenen dosya indirme iletişim kutusunda kullanılacak dosya adı.

Döndürülenler

Dosya akışı sonuç nesnesi.

Şunlara uygulanır