File Picker

The File Picker is seamlessly integrated into the Dropzone widget and is triggered when the user taps on the drop area. This method provides a user-friendly way to upload files on both web and mobile platforms, and it shares the same robust validation system as the drag-and-drop method.

πŸ”’ Powerful Validations

All validations specified through customization parameters are strictly enforced:

  • If a file format is restricted, the File Picker dynamically filters the files shown to the user, only allowing them to select supported formats.

  • If the file count limit is reached (as defined in maxFileCount), the File Picker will automatically be disabled.

  • If the limit is set to 0, uploads are entirely disabled. Tapping the dropzone in this case will do nothing.

This ensures a smooth and consistent experience across devices while maintaining full control over the upload behavior.

🚫 What Happens When the Limit is Reached?

When the number of uploaded files has reached the maxFileCount:

  • Tapping the dropzone will no longer trigger the File Picker.

  • No visual picker is opened, ensuring the user is not confused by a disabled but clickable element.

🎯 Extension Filtering

When you specify accepted extensions (e.g., .jpg, .pdf), the File Picker automatically:

  • Filters incompatible files from being displayed in the system picker.

  • Ensures that only compatible files can be selected, based on the rules you defined with allowedFileFormats.

⚠️ Important: This behavior only applies when using allowedFileFormats. If you use blockedFileFormats instead, it means all file types are allowed except the ones you explicitly block. In that case, the file picker will still show unsupported files, but don’t worry: if a user selects a blocked file, it will be rejected during processing and the onErrorAction callback will be triggered with the appropriate error message.

Last updated