DxUpload.MaxFileCount Property
Specifies the maximum number of files a user can select to upload.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v24.1.dll
NuGet Package: DevExpress.Blazor
Declaration
[DefaultValue(1000)]
[Parameter]
public int MaxFileCount { get; set; }
Property Value
Type | Default | Description |
---|---|---|
Int32 | 1000 | The maximum number of files to upload. |
Remarks
You can enable users to upload multiple files (set the AllowMultiFileUpload to true
). To specify the maximum number of files to upload, use the MaxFileCount
property. A user can select files several times, but the total number of files can not exceed the limit.
The MaxFileCount
property’s default value is 1000
. We recommend that limit for correct operation of the DxUpload
component. If you need to reset the limit and allow users to select any number of files, set the property to 0
(zero).
The following code snippet sets the limit to 500
files.
<DxUpload UploadUrl="https://localhost:10000/api/Upload/Upload/"
AllowMultiFileUpload="true"
MaxFileCount="500">
</DxUpload>
In case the component reaches its limit, the user can remove uploaded files and submit other files. You can also remove files in code. Use the following methods: RemoveFile(UploadFileInfo), RemoveFiles(IEnumerable<UploadFileInfo>), RemoveAllFiles().