I've a simple input of type file and I need to check a boolean variable before opening the file dialog to choose a file. Is there a way to do this? This is my code:
<input type="file" id="uploadFile" [disabled]="disableUpload" (change)="onUpload($event)" />
Clicking on input, a file dialog is shown. I need to do a check that, if positive, block the file dialog opening. Thanks to everybody!