Having trouble using a button to trigger the input file? Every time I click on the button, it redirects me to http://localhost:3000/availability?vue-file-input= instead of opening the file selector. Can someone please help me identify where I have made a mistake?
<div class="vue-file-wrapper">
<button class="vue-button" @click="document.getElementById('fileInput').click()">Choose File
</button>
<div>{{ filename }}</div>
<input
type="file"
ref="file"
style="display:none"
name="vue-file-input"
id="fileInput"
:disabled="user.availability"
@change="onFileSelected"
>
</div>