Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <input id="brief" type="file" @change="processFile($event)" class="">
- <div @click="nextRoute()" class="btn" :class="{'btn--primary': project !== '', 'btn--disabled': project == '' || project == '<p><br></p>',}">Next</div>
- nextRoute () {
- let $this = this;
- const fd = new FormData();
- fd.append('file', this.file, this.fileName);
- fd.append('project', this.project);
- this.$axios.post(process.env.apiURL+'/api/contact/submission/project/'+submission, fd, {
- headers: {
- 'Content-Type': 'multipart/form-data'
- }
- })
- .then(function (response) {
- if ($this.error.file == null && $this.error.project == null){
- TweenMax.to("#stageFive", 0.5, {opacity:0, y:-100, delay:0, ease:Back, force3D:true}, 0.2);
- localStorage.stage = 6;
- setTimeout(function(){
- $this.$router.push({path:'/start-project/complete'})
- }, 500);
- }
- })
- .catch(function (error) {
- if(error.response) {
- $this.error = error.response.data.errors;
- }
- });
- },
- processFile(event) {
- this.file = event.target.files[0]
- this.fileName = event.target.files[0].name
- },
Add Comment
Please, Sign In to add comment