Skip to main content

DxUpload.MaxFileSize Property

Specifies the maximum file size in bytes.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.1.dll

NuGet Package: DevExpress.Blazor


public int MaxFileSize { get; set; }

Property Value

Type Description

An integer value that specifies the maximum file size in bytes.


Use the MaxFileSize and MinFileSize properties to limit an uploaded file’s size. The Upload component validates the file size on the client side and displays an error message if validation fails.

<DxUpload Name="myFile" 

Upload Size Validation

You can also use the following Upload properties to validate uploaded files on the client:

  • AcceptedFileTypes - Specifies a file type (MIME type) or multiple types (separated by a comma) that the Upload component accepts.
  • AllowedFileExtensions - Specifies file extensions (an array) that the Upload component accepts.

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

Run Demo: Upload - Validation

See Also