New to Telerik UI for BlazorStart a free 30-day trial

Definition

Namespace:Telerik.Blazor.Components.Common.Upload

Assembly:Telerik.Blazor.dll

Type Parameters:

TFileInfo

TFileTemplateContext

TFileInfoTemplateContext

Syntax:

C#
public abstract class TelerikUploadBase<TFileInfo, TFileTemplateContext, TFileInfoTemplateContext> : BaseComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable where TFileInfo : FileInfoBase where TFileTemplateContext : FileTemplateContextBase<TFileInfo> where TFileInfoTemplateContext : FileInfoTemplateContextBase<TFileInfo>

Inheritance: objectComponentBaseBaseComponentTelerikUploadBase<TFileInfo, TFileTemplateContext, TFileInfoTemplateContext>

Derived Classes: TelerikFileSelectTelerikUpload

Implements: IComponentIDisposableIHandleAfterRenderIHandleEvent

Inherited Members BaseComponent.ShouldRender()BaseComponent.OnInitializedAsync()BaseComponent.Dispose()BaseComponent.InitLocalizer()BaseComponent.ThrowIfParameterIsNull(object, string)BaseComponent.HaveOptionsChanged(IDictionary<string, object>, IDictionary<string, object>)BaseComponent.GetClassString(params string[])BaseComponent.InvokeAsync<T>(string, params object[])BaseComponent.InvokeAsync<T>(string, CancellationToken, params object[])BaseComponent.InvokeVoidAsync(string, params object[])BaseComponent.InvokeVoidAsyncWithoutAwait(string, params object[])BaseComponent.InvokeComponentMethodAsync<T>(string, params object[])BaseComponent.InvokeComponentMethodAsync<T>(string, CancellationToken, params object[])BaseComponent.InvokeVoidComponentMethodAsync(string, params object[])BaseComponent.InvokeComponentVoidMethodAsync(string, object)BaseComponent.InvokeDisposeAsync()BaseComponent.StateHasChanged()BaseComponent.RootComponentBaseComponent.ClassComponentBase.BuildRenderTree(RenderTreeBuilder)ComponentBase.OnInitialized()ComponentBase.OnParametersSet()ComponentBase.OnParametersSetAsync()ComponentBase.OnAfterRender(bool)ComponentBase.InvokeAsync(Action)ComponentBase.InvokeAsync(Func<Task>)ComponentBase.DispatchExceptionAsync(Exception)ComponentBase.SetParametersAsync(ParameterView)...

Constructors

C#
protected TelerikUploadBase()

Methods

Removes the files from the list.

C#
public void ClearFiles()
C#
protected override Task OnAfterRenderAsync(bool firstRender)
Parameters:firstRenderboolReturns:

Task

Overrides: BaseComponent.OnAfterRenderAsync(bool)

Opens the browser file selection dialog.

C#
public void OpenSelectFilesDialog()

Properties

The accept attribute of the file input. Filters the browser file selection dialog.

C#
[Parameter]
public string Accept { get; set; }

The list of the allowed file extensions. Used for client-side validation.

C#
[Parameter]
public List<string> AllowedExtensions { get; set; }

[Accessibility] Specifies the aria-describedby attribute of the file selection button.

C#
[Parameter]
public string AriaDescribedBy { get; set; }

[Accessibility] Specifies the aria-labelledby attribute of the file selection button.

C#
[Parameter]
public string AriaLabelledBy { get; set; }

The capture attribute of the file input.

C#
[Parameter]
public string Capture { get; set; }

The id of the external TelerikDropZone component.

C#
[Parameter]
public string DropZoneId { get; set; }

Specifies if the component is enabled.

C#
[Parameter]
public bool Enabled { get; set; }

FileInfoTemplate

RenderFragment<TFileInfoTemplateContext>

Defines the template used to render file information for each file item.

C#
[Parameter]
public RenderFragment<TFileInfoTemplateContext> FileInfoTemplate { get; set; }

Files

IEnumerable<TFileInfo>

Used to preload a list of files to the Upload component during initialization.

C#
public virtual IEnumerable<TFileInfo> Files { get; set; }

FileTemplate

RenderFragment<TFileTemplateContext>

Defines the template used to render each file item including the actions and progress.

C#
[Parameter]
public RenderFragment<TFileTemplateContext> FileTemplate { get; set; }

The id attribute of the file input.

C#
[Parameter]
public string Id { get; set; }

Defines the maximum file size in bytes.

C#
[Parameter]
public long? MaxFileSize { get; set; }

Defines the minimum file size in bytes.

C#
[Parameter]
public long? MinFileSize { get; set; }

Enables the selection of multiple files. If set to false, only one file can be selected at a time.

C#
[Parameter]
public bool Multiple { get; set; }

Defines the content of the "Select files..." button.

C#
[Parameter]
public RenderFragment SelectFilesButtonTemplate { get; set; }