#2239·dropzone

acceptedFiles doesn't work (validate) ignoring

Author: fosterushkaCreated Jun 20, 2023Updated Nov 7, 2024

The configuration for the Dropzone component is as follows, with some improvements:

javascript
Dropzone.options.imageDropzone = {
  url: '{{ some url) }}',
  maxFilesize: 8, // MB
  acceptedFiles: 'image/*,application/pdf', // ✅ I have also tried .jpeg, .jpg, .png, .gif
};

Expected behavior In the native file upload window, files that are not described in acceptedFiles should not be selectable for uploading, just like in the native window. For example:

xml
<input type="file" id="avatar" name="avatar" accept="image/png, image/jpeg">

Configuration details:

  • iOS 16
  • macOS Ventura 13.4
  • Version 114.0.5735.133 (Official Build) (arm64) | Firefox 114.0.1 (64-bit)
  • Dropzone version 5.5.1 and 5.9.3 (i have tested a lot of version doesn't work acceptedFiles

WhatsApp Image 2023-06-20 at 11 29 11