blazor-devexpress-dot-blazor-dot-dxupload-ff260705.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 selected a file, the Upload packs the file into an Ajax request and sends this request to the server. The Upload displays this file in the list and indicates the upload status.
Set the ShowFileList property to false to hide the file list.
<DxUpload Name="myFile" UploadUrl="https://localhost:10000/api/Upload/Upload/"
ShowFileList="false">
</DxUpload>
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace BlazorDemo.AspNetCoreHost;
[Route("api/[controller]")]
[ApiController]
public class UploadController : ControllerBase {
[HttpPost("[action]")]
public ActionResult Upload(IFormFile myFile) {
try {
// Write code that saves the 'myFile' file.
// Don't rely on or trust the FileName property without validation.
} catch {
return BadRequest();
}
return Ok();
}
}
See Also