alexa
menu

Blazor Toolkit

    Show / Hide Table of Contents

    Class UploadedFiles

    Represents a component that specifies the list of files that will be preloaded on rendering of the SfUploader component.

    Inheritance
    System.Object
    SfBaseComponent
    UploadedFiles
    Implements
    System.IAsyncDisposable
    Inherited Members
    SfBaseComponent.DisposeAsync()
    Namespace: Syncfusion.Blazor.Toolkit.Inputs
    Assembly: Syncfusion.Blazor.Toolkit.dll
    Syntax
    public class UploadedFiles : SfBaseComponent, IAsyncDisposable
    Remarks

    The UploadedFiles component allows you to define files that should be displayed as already uploaded when the SfUploader component is initially rendered. This is useful for scenarios where you want to show previously uploaded files or files that exist on the server. The component manages a collection of UploadedFile objects that represent the preloaded files.

    Examples

    The following example shows how to use the UploadedFiles component to preload files in an uploader.

    <SfUploader>
        <UploadedFiles>
            <UploadedFile Name="document.pdf" Size="1024000" Type="application/pdf"></UploadedFile>
            <UploadedFile Name="image.jpg" Size="512000" Type="image/jpeg"></UploadedFile>
        </UploadedFiles>
    </SfUploader>

    Constructors

    UploadedFiles()

    Declaration
    public UploadedFiles()

    Properties

    Files

    Gets or sets the collection of uploaded files that are preloaded in the SfUploader component.

    Declaration
    public List<UploadedFile> Files { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.List<UploadedFile>

    A System.Collections.Generic.List<> of UploadedFile objects representing the preloaded files. The default value is an empty list.

    Remarks

    This property contains the list of files that will be displayed as already uploaded when the SfUploader component is rendered. Each file in the collection is represented by an UploadedFile object that contains file metadata such as name, size, and type. The files in this collection are automatically added to the uploader's file list during component initialization.

    Examples

    The following example shows how to access and work with the Files collection.

    // Access the files collection
    var uploaderFiles = new UploadedFiles();
    uploaderFiles.Files.Add(new UploadedFile 
    { 
        Name = "document.pdf", 
        Size = 1024000, 
        Type = "application/pdf" 
    });

    Methods

    BuildRenderTree(RenderTreeBuilder)

    Declaration
    protected override void BuildRenderTree(RenderTreeBuilder __builder)
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder

    Implements

    System.IAsyncDisposable
    Back to top Generated by DocFX
    Copyright © 2001 - 2026 Syncfusion Inc. All Rights Reserved