Docs_Validation.razor

1. Validation Concept

There are 3 Validation properties for <CoreUploader>

If files don't match the properties, the CoreUploader.FilesError event will be fired.

If both AcceptMimeTypes and AcceptExtensions are set, the files only need match one of them.

AcceptMimeTypes and AcceptExtensions will work for Most browsers and the selected file dialog will hide invalid files.

2. MinSizeKB/MaxSizeKB (in bytes)

This property sets the maximum allowed size of the file, in bytes. set MaxSizeKB="200" means 200KB.

3. AcceptMimeTypes

This property can be set to one or multiple values like this : AcceptMimeTypes="image/*,video/*"

4. AcceptExtensions

This property can be set to one or multiple values like this : AcceptExtensions="doc,docx,xls,xlsx,ppt,pptx,zip"

5. Custom Validation before upload

Developer can modify HandleFilesAdded to put invalid files to ErrFiles.

6. Custom Validation after upload

Developer can modify ProcessFilesAsync to check file content after file be uploaded.

An error has occurred. This application may no longer respond until reloaded. Reload 🗙