Skip to content

dam1r89/vuejs-photo-upload

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Photo upload component, not trying to be "reusable component". It works on its own or you can use it as a starting point.

Photo Upload

Example

Vue.component('photo-upload', require('./components/PhotoUpload.vue'));

and

<photo-upload @input="handleFileUpload" :value="value"></photo-upload>

Optional parameter disabled to enable/disable compnent.

Value is current image preview (if image is already uploaded)

Example how to upload photo, or other way is to serialize file with base64.

handleFileUpload(file){
    let form = new FormData();
    form.append('photo', file);

	// or this.$http
    axios.post(`/api/upload`, form).then(res => {
		
    }, res => {

    });
},

About

Photo upload Vue.js component, good starting point for further customization.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages