title: Difference in terminal and PHP curl versions
body: <p>I am trying to make a file upload with additional parameters in terminal, I use the <code>-F</code> param to combine all the parameters I need, here is what I got:</p>
  
  <p><code>curl -H "Content-Type:multipart/form-data" -F "video=@174deab3-a7c6-4410-a304-d7ee49b28900.mp4" -F "videoExt=mp4" -F "videoSize=10230" -F "thumbExt=png" -F "thumb=IufIsduSii823" -F "id=8" http://test.dev/test.php</code></p>
  
  <p>The problem is that on the handling side (test.php) the <strong>$_FILES</strong> array is empty.</p>
  
  <p>Then I tried to make a simple html form that will post to the handler a file, and I tried to make the curl request with <code>php_curl</code>. Here goes the code:</p>
  
  <pre><code>    $postargs = [
          'videoExt' =&gt; 'mp4',
          'id' =&gt; 8,
          'thumb' =&gt; 'IkJdfjiaskdkI*82',
          'thumbExt' =&gt; 'png',
          'videoSize' =&gt; '10240'
      ];
  foreach ($_FILES as $param =&gt; $file) {
          $postargs[$param] = '@' . $file['tmp_name'] . ';filename=' . $file['name'] . ';type=' . $file['type'];
      }
  
      $header = array("Content-type: multipart/form-data");
      $ch = curl_init('http://localhost:8080');
      curl_setopt($ch,CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)");
      curl_setopt($ch,CURLOPT_RETURNTRANSFER, false);
      curl_setopt($ch,CURLOPT_ENCODING,"");
      curl_setopt($ch,CURLOPT_HTTPHEADER,$header);
      curl_setopt($ch,CURLOPT_FOLLOWLOCATION, TRUE);
      curl_setopt($ch,CURLOPT_POST,TRUE);
      curl_setopt($ch,CURLOPT_POSTFIELDS,$postargs);
      curl_exec($ch);
      curl_close($ch);
  </code></pre>
  
  <p>This script succesfully makes a curl request to the handler and the file is uploaded. Please advise what is the difference, and how can I achieve that in terminal.</p>