Topic: Add File Upload Event
Andrew Ford priority asked 1 year 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');
});
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Priority
- 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