Interface IFormFile
public interface IFormFile
Properties
ContentDisposition
Gets the raw Content-Disposition header of the uploaded file.
string? ContentDisposition { get; }
Property Value
ContentType
Gets the raw Content-Type header of the uploaded file.
string? ContentType { get; }
Property Value
FileName
Gets the file name from the Content-Disposition header.
string? FileName { get; }
Property Value
Headers
Gets the header dictionary of the uploaded file.
IHeaderDictionary Headers { get; }
Property Value
Length
Gets the file length in bytes.
long Length { get; }
Property Value
Name
Gets the form field name from the Content-Disposition header.
string? Name { get; }
Property Value
Methods
CopyToAsync(Stream, CancellationToken)
Copy file contents to stream
Task CopyToAsync(Stream target, CancellationToken cancellationToken = default)
Parameters
target
StreamcancellationToken
CancellationToken
Returns
GetReaderAsync()
Get reader stream
Task<Stream> GetReaderAsync()