I am trying to use a button for the input file to trigger. But the issue I am facing here is whenever I click on the button it takes me to http://localhost:3000/availability?vue-file-input= url instead of opening the file selector. Please help me find where I am going wrong.
<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>