Hello I was creating an upload Image but I have incounter an issue on preview image I have seen this solution and tried to replicate the File is selected and Blob URL is seen but I am having an issue on the URL and update Here is the link for the article. Also if posible to change the upload to target only Image files.
HTML code
<input type="file" @change="uploadImageChange"/>
<div class="dashboard-Image-modal__previewUploadImage">
<img if="imageSelectedUrl" :src="imageSelectedUrl"/>
</div>
Method
data(){
return {
imageSelectedUrl:null
};
},
methods:{
uploadImageChange(e){
const file = e.target.files[0];
this.imageSelectedUrl = URL.createObjectURL(file);
}
}