Topic: File Upload plugin: how to reset <input type = “file”>
                  
                  gkpsoriana
                  free
                  asked 6 years ago
                
Hi there, I want to reset the contents of my file input programmatically:
DescripciónHow should I do that?
Thanks
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Status
              Resolved
Specification of the issue
              - ForumUser: Free
 - Premium support: No
 - Technology: MDB jQuery
 - MDB Version: 4.6.0
 - Device: MacBook Pro
 - Browser: Google Chrome Version 72.0.3626.
 - OS: macOS Mojave Version 10.14.3
 - Provided sample code: No
 - Provided link: No
 
gkpsoriana free commented 6 years ago
This answered my question: Anna Morawska staff answered 7 days ago 0 0 Hi there,
you can simulate a click event like this:
document.getElementsByClassName('btn btn-sm btn-danger')[0].click() Best,
Ania