Topic: How to clean file input?
miguel Angel (miqi) free asked 6 years ago
Damian Gemza staff answered 6 years ago
Dear Miguel,
What do you mean by clearing the file input field? Do you want to remove files which user has added into file input field? Or something else?
If you want to remove files from the array, you could create a method which assigns empty array into files variable.
So the code would like similar as mine:
clearFiles() { this.files= []; }
Best Regards,
Damian
miguel Angel (miqi) free commented 6 years ago
Dear Damian , Thanks for your contribution, they have served me a lot, not in the same way that you indicate it but very similar: <pre>this.file = <UploadFile> {};</pre>FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Resolved
- ForumUser: Free
- Premium support: No
- Technology: MDB Angular
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: No
- Provided link: No