FileInfo Class

Represents a file which the user selects for upload via RadzenUpload.

Inheritance

Object

FileInfo

PreviewFileInfo

Implements

Forms.IBrowserFile

Namespace: Radzen

Assembly: Radzen.Blazor.dll

Syntax

public class FileInfo : Forms.IBrowserFile

Constructors

FileInfolink

Creates FileInfo.

Declaration
public FileInfo()

FileInfolink

Creates FileInfo.

Declaration
public FileInfo(Forms.IBrowserFile source)
Parameters
Type Name Description
Forms.IBrowserFile source

Properties

ContentTypelink

Gets the ContentType.

Declaration
public string ContentType { get; set; }
Property Value
Type Description
stringGets the ContentType.

LastModifiedlink

Gets the LastModified.

Declaration
public DateTimeOffset LastModified { get; set; }
Property Value
Type Description
DateTimeOffsetGets the LastModified.

Namelink

Gets the name of the selected file.

Declaration
public string Name { get; set; }
Property Value
Type Description
stringGets the name of the selected file.

Sizelink

Gets the size (in bytes) of the selected file.

Declaration
public long Size { get; set; }
Property Value
Type Description
longGets the size (in bytes) of the selected file.

Sourcelink

Gets the IBrowserFile source.

Declaration
public Forms.IBrowserFile Source { get; }
Property Value
Type Description
Forms.IBrowserFileGets the IBrowserFile source.

Methods

OpenReadStreamlink

Open read stream.

Declaration
public IO.Stream OpenReadStream(long maxAllowedSize, Threading.CancellationToken cancellationToken)
Parameters
Type Name Description
long maxAllowedSize The maximum allowed size.
Threading.CancellationToken cancellationToken The cancellation token.
Returns
Type Description
IO.StreamThe stream.
An error has occurred. This app may no longer respond until reloaded. Reload 🗙