Topic: File uploader Plugin field issue
Waslix
priority
asked 1 week ago
Expected behavior
Actual behavior
Resources (screenshots, code snippets etc.) My concern is that, I am using the file upload mdb plugin for the drag and drop upload, but I need to customize it, using javascript I want to change the data-mdb-default-file attribute of the field, I changed its value using JS, so how to init the field again so the changed value file can be added on that field
Mateusz Lazaru
staff
answered 1 week ago
That is how you initialize the plugin:
const fileUploadEl = document.querySelector('#file-upload');
const fileUploadInstance = new FileUpload(fileUploadEl);
Then use fileUploadInstance.update()
method to update configuration.
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 8.2.0
- Device: PC
- Browser: chrome
- OS: windows
- Provided sample code: No
- Provided link: No