I try to have a input file button (this is in a v-for loop). But I don't want to use the b-form-file tag.
So I've tried - at least - all things I have seen, but nothing worked out for me.
I have the following code:
<b-button @click="selectFile()" variant="success" :id="index"> Upload </b-button>
<input type="file" ref="file" style="display: none;"/>
and this in my script / methods:
methods: {
selectFile() {
this.$refs.file;
}
}
Result: When I click the button nothing happend - but I get no error as well.
Thanks for your help !