I have used Vuetify.js as Nuxt.Js's UI framework. I wanted to get file object when I input file my apps. So I used v-file-input component in Vuetify.Js and I made code like below.
<template>
<div>
<v-file-input
label="fileinput"
multiple
v-model="files"
@change="getFileObject()"></v-file-input>
</div>
</template>
<script lang="ts">
import { Component, Vue } from 'nuxt-property-decorator'
@Component({})
export default class extends Vue{
files:any = []
fileObj:any = {}
async getFileObject(file:any){
this.fileObj = await file
console.log(this.fileObj)
}
}
</script>
I checked the file object using console.log. but 'this.fileObj' is undefined. How do I get file object when I input files? Could anyone advise me?