I am using vuetify with vue.js and I try to preview image before upload
The HTML
<v-file-input
v-on:change="Preview_image($event)"
></v-file-input>
<img id="Preview_image_create" class="Preview_image">
the Vue.js code
methods: {
Preview_image(e)
{
console.log(e);
if (e.target.files && e.target.files[0])
{
}
},
when choosing an image it gives an error
Cannot read property 'files' of undefined"
logging e gives:
File {name: "148200_4580089360895_1364944205_n.jpg", lastModified: 1374722747086, lastModifiedDate: Thu Jul 25 2013 05:25:47 GMT+0200 (Eastern European Standard Time), webkitRelativePath: "", size: 8506, …}
lastModified: 1374722747086
lastModifiedDate: Thu Jul 25 2013 05:25:47 GMT+0200 (Eastern European Standard Time) {}
name: "148200_4580089360895_1364944205_n.jpg"
size: 8506
type: "image/jpeg"
webkitRelativePath: ""
__proto__: File
so how to preview the image?