I am attempting to create an input file button within a v-for loop without using the b-form-file tag. Despite trying various solutions, none of them have worked for me.
Here is the code I have so far:
<b-button @click="selectFile()" variant="success" :id="index"> Upload </b-button>
<input type="file" ref="file" style="display: none;"/>
And this is my script/methods section:
methods: {
selectFile() {
this.$refs.file
}
}
Currently, when I click the button nothing happens and no errors are displayed. Any assistance would be greatly appreciated!