No error message displayed when maximum number of files are uploaded

Created on 3 April 2019, about 6 years ago
Updated 27 March 2025, 13 days ago

Steps to reproduce

  1. Create a form with a dropzone element, limited to a certain number of files
  2. Try to add more files than the element allows

Expected result

An error message should be displayed

Actual result

The new file is blocked from being uploaded, but there's no message to tell the user that their upload did not succeed.

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇬🇧United Kingdom malcomio

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇩🇪Germany malevolyn

    I just ran into the same issue where no error message is shown when reaching the maximum number of allowed files. The solution for me was essentially the patch mentioned above. However, this fix is not included in the current 8.x-2.x-dev branch, so @abu-zakham comment appears to be incorrect.

    This part needs to be removed:

    dropzoneInstance.on('maxfilesexceeded', function () {
      var rejectedFiles = dropzoneInstance.getRejectedFiles();
        for (var i = 0; i < rejectedFiles.length; i++) {
          dropzoneInstance.removeFile(rejectedFiles[i]);
        }
    });
    
Production build 0.71.5 2024