lekhang2512 / vue-upload-multiple-image

A simple upload multiple image component for Vuejs
132 stars 50 forks source link

i cant use axios with vue-upload-multiple-image #45

Open lokize opened 4 years ago

lokize commented 4 years ago

hi, how to upload image to a folder with this plugin?

machour commented 3 years ago

It works using axios.

Use the @upload-success prop to call your own method:

for example:

@upload-success="setImages"

    setImages(formData, index, fileList) {
      const data = fileList[index].path; // <- this is your image data-uri encoded

      this.$api.post('/upload', {data});
    },