[Vuejs]-Multiple file upload with Vue and Axios

3👍

As far as I can see your attempt seems to be fine basically. The error might be in your $ref itself. Instead of using a reference, you might solve your problem by simply accessing the passed in event in your function handleUpload(). You could achieve this by something like this.

handleUpload(e) {
  console.log(e.target.files);
}

This should probably work. A working example could be found here.

👤Aer0

1👍

Maybe this will help someone(not for the author, because I see that he avoided my mistake). I used an event ‘click’, but have to use a ‘change’ event. This thing has stoled a couple of hours from me.

Leave a comment