blazor-devexpress-dot-blazor-dot-dxfileinput-87806ad5.md
Specifies whether to show the file list.
Namespace : DevExpress.Blazor
Assembly : DevExpress.Blazor.v25.2.dll
NuGet Package : DevExpress.Blazor
[DefaultValue(true)]
[Parameter]
public bool ShowFileList { get; set; }
| Type | Default | Description |
|---|---|---|
| Boolean | true |
true to show the file list; otherwise, false.
|
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:
<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