Add File Upload Event


Topic: Add File Upload Event

Andrew Ford pro premium priority asked 12 months ago

Could a "fileRemoveAll"/"fileEmpty" event be created?

With this, if a user uploads multiple files - and then removes one, the target button becomes disabled.

I'd like to only disable the target button when the field becomes empty again.

Resources (screenshots, code snippets etc.)

let fileUploadInput = document.getElementById('dnd-multiple-files');
fileUploadInput.addEventListener('fileAdd.mdb.fileUpload', (e) => {
    postbtns.classList.remove('disabled');
});
fileUploadInput.addEventListener('fileRemove.mdb.fileUpload', (e) => {
    postbtns.classList.add('disabled');
});

Grzegorz Bujański staff answered 12 months ago

Thanks for reporting. We will consider adding such events.


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue
  • User: Pro
  • Premium support: Yes
  • Technology: MDB Standard
  • MDB Version: MDB5 7.0.0
  • Device: n/a
  • Browser: n/a
  • OS: n/a
  • Provided sample code: No
  • Provided link: No