Back to Devexpress

DxFileInput.ShowFileList Property

blazor-devexpress-dot-blazor-dot-dxfileinput-87806ad5.md

latest1.8 KB
Original Source

DxFileInput.ShowFileList Property

Specifies whether to show the file list.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
[DefaultValue(true)]
[Parameter]
public bool ShowFileList { get; set; }

Property Value

TypeDefaultDescription
Booleantrue

true to show the file list; otherwise, false.

|

Remarks

Once a user selects files in the Open dialog or drags files onto a drop zone, the File Input component adds these files to the file list. The file list indicates each file’s upload status and displays upload, cancel, reload, and remove buttons. On the image below, the file list contains 4 files in different states:

Disable the ShowFileList property to hide the file list:

razor
<DxFileInput FilesUploading="OnFilesUploading" ShowFileList="false" />

@code {
    async Task OnFilesUploading(FilesUploadingEventArgs args) {
        foreach (var file in args.Files) {
            /* The following code is intended for demonstration purposes only.
            Do not read a stream directly in memory to avoid performance and security-related issues. */
            using var stream = new System.IO.MemoryStream();
            await file.OpenReadStream(file.Size).CopyToAsync(stream);
        }
    }
}

See Also

DxFileInput Class

DxFileInput Members

DevExpress.Blazor Namespace