FormFile Class

Definition

Default implementation of IFormFile.

C#
public class FormFile : Microsoft.AspNetCore.Http.IFormFile
Inheritance
FormFile
Implements

Constructors

Properties

ContentDisposition

Gets the raw Content-Disposition header of the uploaded file.

ContentType

Gets the raw Content-Type header of the uploaded file.

FileName

Gets the file name from the Content-Disposition header.

Headers

Gets the header dictionary of the uploaded file.

Length

Gets the file length in bytes.

Name

Gets the name from the Content-Disposition header.

Methods

CopyTo(Stream)

Copies the contents of the uploaded file to the target stream.

CopyToAsync(Stream, CancellationToken)

Asynchronously copies the contents of the uploaded file to the target stream.

OpenReadStream()

Opens the request stream for reading the uploaded file.

Applies to

Produkt Verzie
ASP.NET Core 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0