Skip to main content

DxUpload.AllowedFileExtensions Property

Specifies file extensions that the Upload component accepts.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v23.2.dll

NuGet Package: DevExpress.Blazor


public List<string> AllowedFileExtensions { get; set; }

Property Value

Type Description

A list of allowed file extensions.


Use the AllowedFileExtensions property to restrict extensions of files that users can upload.

<DxUpload Name="myFile" UploadUrl="https://localhost:10000/api/Upload/Upload/"
          AllowedFileExtensions="@(new List<string> { ".jpg", ".jpeg", ".gif", ".png" })">

Once a user selected or dropped a file, the Upload validates the file’s extension on the client. If the extension is not allowed, the Upload displays an error.

Upload - File extension validation


The AllowedFileExtensions property does not affect the Open File dialog’s filter.

Use the AcceptedFileTypes property to filter files in the Open File dialog. You can specify allowed file types (image, video, etc.) and/or individual file extensions.

For more information on server-side validation, refer to Server-Side Validation.

Run Demo: Upload - Validation

See Also