New to KendoReact? Start a free 30-day trial
Modes of Operation
Modes of OperationPremium
The Upload enables you to manage the files for upload that will be rendered by setting the Upload into its controlled or uncontrolled mode.
- Controlled mode gives you full control over the files list and requires you to handle all file changes via props and events.
- Uncontrolled mode lets the Upload component manage its own file state, with the option to set an initial list of files.
Controlled Mode
Controlled mode can be used when you need to:
- Integrate file uploads with other form data or global application state.
- Validate, filter, or modify files before they appear in the Upload list.
- Fully control which files are displayed and when.
To enable the controlled mode of the files for upload:
- Set the
files
property. - Subscribe to the following events for updates:
The following example demonstrates how to use controlled mode to prevent the Upload from uploading more than two files:
Change Theme
Theme
Loading ...
Uncontrolled Mode
In uncontrolled mode, the Upload component manages its own internal list of files.
You can set the initial files using the defaultFiles
property, but after that, the component handles all file state changes automatically.
Change Theme
Theme
Loading ...