title: Wordpress Image Upload Error - Specified file failed upload test
body: <p>I have been trying for hours to get this working.</p>
  
  <p>WP image upload works fine for single image without using <code>multiple</code> tag.</p>
  
  <p>But when tried to to upload multiple images after changing the php code for multiple images (array) and adding <code>multiple</code> tag, show error:</p>
  
  <h2>Specified file failed upload test.</h2>
  
  <p>File upload data is coming through JSON which works fine when printed.</p>
  
  <p>Below is what I have tried so far:</p>
  
  <pre><code>    if(!function_exists('wp_handle_upload')){
          require_once(ABSPATH.'wp-admin/includes/file.php');
      }
  
      foreach($styledNameData as $nameData){
          //echo '&lt;pre&gt;'; print_r($nameData);
          // It Prints
          //Array
          //(
          //  [name] =&gt; A_Front.png
          //  [type] =&gt; image/png
          //  [tmp_name] =&gt; C:\\xampp\\tmp\\php5BFB.tmp
          //  [error] =&gt; 0
          //  [size] =&gt; 32901
          //)
  
          $upload_overrides = array('test_form' =&gt; false);
          $movefile = wp_handle_upload($nameData, $upload_overrides);
      }
      if($movefile &amp;&amp; !isset($movefile['error'])){
          echo '&lt;pre&gt;';
          print_r($movefile);
      } else {
          echo '&lt;pre&gt;';
          print_r($movefile['error']);
      }
  </code></pre>
  
  <p>HTML is:</p>
  
  <pre><code>&lt;form id="imagesForm" method="POST" enctype="multipart/form-data" action="&lt;?php echo admin_url('admin-ajax.php'); ?&gt;"&gt;
      &lt;input id="uploadfile" type="file" class="button button-secondary" name="uploadfile[]" multiple /&gt;
      &lt;input type="hidden" name="action" value="shpg_image_upload" /&gt;
      &lt;input type="submit" id="uploadImages" name="uploadImages" class="btn-medium col-sms-5 col-sm-3" value="UPLOAD" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Please help.</p>