<div id="app">
<button class="btn btn-info" @click="$refs.file.click()">upload</button>
<input ref="file" type="file" class="d-none" v-on:change="handleFileUpload()">
<div>{{file.name}}</div>
</div>
let app=new Vue({
el: "#app",
data:{
file: ""
},
methods: {
handleFileUpload: function () {
this.file = this.$refs.file.files[0];
},
}
})