title: How to upload multiple images/files with Javascript and Axios formdata
body: <p>In the attachment you can see my code. I want to be able to send more images from one submit. I am using Vue.js, Axios and Vanilla JS. In what way? My current code work perfectly,and I want a way to add more than one picture/file in this way that is picture on submit.</p>
  
  <pre><code>&lt;div @drop="onDropFile($event)"&gt;
  &lt;label&gt; Choose or drag file &lt;/label&gt;
  &lt;input
     type="file"
     name="profile_image"
     @change="onChangeFile($event)"&gt;
  &lt;/div&gt;
  
  
  onDropFile(e) {
        e.stopPropagation();
        e.preventDefault();
        let files = e.dataTransfer.files;
        this.createFile(files[0]);
      },
  
  onChangeFile(e) {
    let files = e.target.files;
    this.product_image_data = e.target.files[0]
    this.createFile(files[0]);
  },
  createFile(file) {
    if (!file.type.match("image.*")) {
      alert("Select an image");
      return;
    }
    let reader = new FileReader();
    let vm = this;
    reader.onload = function(e) {
      vm.profile_image = e.target.result;
    };
    reader.readAsDataURL(file);
  },
  </code></pre>