i have code below in vue js and i wanted to share a file as u can see, but my problem is i want to save that file name that i uploaded to the API json in post method , is there a way to do it and thanks in advance
<div class="input-file">
<input class="input-file__input" ref="file" type="file">
<div class="input-file__button" @click="selectFile()"></div>
</div>
<script>
selectFile(){
let fileInputElement = this.$refs.file;
fileInputElement.click(); //i want to send this file name to api post method
// ...
},
</script>