Dropzone

The dropzone is a core part of the Powerful File Uploader with Dropzone, optimized and fully integrated to respect and enforce all validation rules defined through your customization parameters.
β
Smart Validation Handling
The dropzone allows users to drag and drop any file β even those that donβt meet your validation criteria β and then internally filters them before they are added to the upload list. For example:
If specific formats are blocked using
blockedFormats
, those files will be rejected automatically, will not appear in the uploaded list and theonError
callback will be triggered with the corresponding error code.If
maxFileCount
is set to1
, and the user attempts to drop more than one file, none of the files will be accepted, and theonError
callback will be triggered with the corresponding error code. You can find all available error codes in the Error Codes section.
This mechanism ensures full compliance with your upload restrictions while still offering a seamless drag-and-drop experience.
Note: The dropzone only works on web platforms. To improve UX on mobile, consider using platform detection to change the displayed instructions dynamically.
π« Disabled State & Upload Limits
The dropzone will become inactive and prevent new uploads in the following cases:
When
maxFileCount
is explicitly set to0
.When the total number of uploaded files reaches the defined
maxFileCount
.
Even though users might still try to drop files, the dropzone will:
Appear visually inactive.
Trigger the
onError
callback with an appropriate error code, allowing you to inform the user via custom messages.
π Customizing Behavior When the Limit Is Reached
When the upload limit has been reached, you can change or hide the default dropzone messages. For example:
Remove the instructional text entirely.
Show a message like: βUpload limit reached. Please remove a file before adding new ones.β
Change the main color of the component to make it look greyed out.
This helps keep the interface clean and intuitive as the upload state evolves.
Last updated