Here's my code for uploading images through VueJs, it's mush simpler and quicker. also provide file preview.
<template lang="html">
<form @submit.prevent="submitAvatar">
<img :src="image" alt="" />
<input type="file" id="avatar" @change="updateAvatar" name="...">