Class FileInfo
Represents a file which the user selects for upload via RadzenUpload.
Namespace: Radzen
Assembly: Radzen.Blazor.dll
Syntax
public class FileInfo : IBrowserFile
Constructors
FileInfo()
Creates FileInfo.
Declaration
public FileInfo()
FileInfo(IBrowserFile)
Creates FileInfo with IBrowserFile as source.
Declaration
public FileInfo(IBrowserFile source)
Parameters
Type | Name | Description |
---|---|---|
IBrowserFile | source |
Properties
ContentType
Gets the ContentType.
Declaration
public string ContentType { get; }
Property Value
Type | Description |
---|---|
System.String |
LastModified
Gets the LastModified.
Declaration
public DateTimeOffset LastModified { get; }
Property Value
Type | Description |
---|---|
DateTimeOffset |
Name
Gets the name of the selected file.
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Size
Gets the size (in bytes) of the selected file.
Declaration
public long Size { get; set; }
Property Value
Type | Description |
---|---|
System.Int64 |
Source
Gets the IBrowserFile.
Declaration
public IBrowserFile Source { get; }
Property Value
Type | Description |
---|---|
IBrowserFile |
Methods
OpenReadStream(Int64, CancellationToken)
Open read stream.
Declaration
public System.IO.Stream OpenReadStream(long maxAllowedSize = null, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | maxAllowedSize | |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
System.IO.Stream |