alexa
menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download

    Show / Hide Table of Contents

    Class UploaderUploadedFiles

    Represents a list of files that are preloaded and displayed in the SfUploader component during initial rendering.

    Inheritance
    System.Object
    UploaderUploadedFiles
    Namespace: Syncfusion.Blazor.Inputs
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class UploaderUploadedFiles : OwningComponentBase
    Remarks

    The UploaderUploadedFiles class is used to configure files that should appear as already uploaded when the SfUploader component is first rendered. This is useful for scenarios where you need to show existing files that were previously uploaded, allowing users to see and manage them alongside new uploads. Each instance represents a single uploaded file with properties like name, size, and type that define the file's metadata.

    Examples

    The following example demonstrates how to configure preloaded files in the Uploader component:

    <SfUploader>
        <UploaderFiles>
            <UploaderUploadedFiles Name="Document1.pdf" Size="2048576" Type="application/pdf" />
            <UploaderUploadedFiles Name="Image1.jpg" Size="1024000" Type="image/jpeg" />
        </UploaderFiles>
    </SfUploader>

    Constructors

    UploaderUploadedFiles()

    Declaration
    public UploaderUploadedFiles()

    Properties

    Name

    Gets or sets the name of the uploaded file.

    Declaration
    public string Name { get; set; }
    Property Value
    Type Description
    System.String

    A string representing the name of the uploaded file. The default value is String.Empty.

    Remarks

    This property specifies the display name of the file that will be shown in the SfUploader component. The name should include the file extension to properly identify the file type and provide a meaningful display name to users.

    Size

    Gets or sets the size of the uploaded file in bytes.

    Declaration
    public double Size { get; set; }
    Property Value
    Type Description
    System.Double

    A double representing the file size in bytes. The default value is 0.

    Remarks

    This property defines the size of the uploaded file in bytes, which is used by the SfUploader component to display file size information to users. The size is typically displayed in a human-readable format (KB, MB, etc.) in the uploader's file list interface.

    Type

    Gets or sets the MIME type of the uploaded file.

    Declaration
    public string Type { get; set; }
    Property Value
    Type Description
    System.String

    A string representing the MIME type of the uploaded file. The default value is String.Empty.

    Remarks

    This property specifies the MIME type (media type) of the file, which helps identify the file format and content type. Common examples include "image/jpeg" for JPEG images, "application/pdf" for PDF documents, or "text/plain" for text files. The MIME type is used by the SfUploader component for file type validation and display purposes.

    Methods

    ComponentDispose(Boolean)

    Declaration
    protected void ComponentDispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved