onyxdevs / dropzonejs-example-with-translations-custom-preview-and-upload-delete-file-with-php

DropzoneJS example with everything you will need, translations, custom preview and a powerful PHP code to handle upload/delete the file
https://onyxdev.net/snippets-item/dropzonejs-example-with-translations-custom-preview-and-upload-delete-file-with-php/
MIT License
9 stars 8 forks source link

improvements are needed #2

Open baxDmitry1973 opened 2 years ago

baxDmitry1973 commented 2 years ago
  1. When deleting a file, the counter does not decrease
  2. Remove the message when all files have been deleted

In order to fix this, you can write like this:

 // Show no files notice
                if (base.dropzoneCount() == 0) {
                    $('.no-files-uploaded').slideDown('easeInExpo');
                    warningsHolder.slideUp('easeInExpo');
                    } 
                    $('.uploaded-files-count').html(base.dropzoneCount());
                    console.log('Files count: ' + base.dropzoneCount());
onyxdevs commented 2 years ago

Hi @baxDmitry1973 , Could you please submit a PR?