title: Upload multiple file with VueJs and Laravel
body: <p>I try to do a single post request to upload multiple files. Now I have a functionally method that works for multiple files. But I want a single request.</p>
  
  <pre><code>submitFile(){
      this.contract_file.forEach((file) =&gt;{
          let formData = new FormData();
          formData.append('file', file.file);
  
          axios.post('contracts/uploadfile/' + this.id_contract,
              formData,
              {
              headers: {
                  'Content-Type': 'multipart/form-data',
              }
          }
          ).then(function(){
              //
          })
          .catch(function(){
              //
          });
      })
  },
  
      public function uploadFile(Request $request, Contract $contract)
      {
              $filename = $request-&gt;file('file')-&gt;getClientOriginalName();
  
              $path = $request-&gt;file('file')-&gt;store($contract-&gt;id,'uploads');
              $contractFile = new ContractFile();
  
              $contractFile-&gt;fill([
                  'contract_id'   =&gt; $contract-&gt;id,
                  'name'          =&gt; $filename,
                  'path'          =&gt; $path,
              ])-&gt;save();
      }
  </code></pre>
  
  <p><strong>Update:</strong>
  This is what I changed,but..</p>
  
  <pre><code>let formData = []
  this.contract_file.forEach((file,index) =&gt;{
      formData[index] = new FormData();
      formData[index].append('file', file.file);
  })
  
  foreach($request-&gt;file('file') as $file){
      //same code but I use  $fille
  </code></pre>
  
  <p>}</p>
  
  <p>Message:</p>
  
  <blockquote>
    <p>Missing boundary in multipart/form-data POST data in <b>Unknown</b></p>
  </blockquote>
  
  <p><strong>Update2:</strong></p>
  
  <pre><code>    &lt;file-upload
      class="btn btn-primary"
      :multiple="true"
      :drop="true"
      :drop-directory="true"
      v-model="files"
      @input-filter="inputFilter"
      @input-file="inputFile"
  
      ref="upload"&gt;
      &lt;i class="fa fa-plus"&gt;&lt;/i&gt;
      Select files
      &lt;/file-upload&gt;
  </code></pre>