title: Upload files to my rest api
body: <p>I want to upload file to my google cloud storage with my rest api with php curl with this php code </p>
  
  <pre><code>if( $_SERVER['REQUEST_METHOD'] == 'POST' ){
  
          $file = $_FILES['files'];
          $fileName = $file['name'];
          $fileType = $file['type'];
          $fileTmp = $file['tmp_name'];
          $curl = curl_init();
          curl_setopt_array($curl, array(
            CURLOPT_URL =&gt; "http://acquired-backup-198200.appspot.com/upload?uname=arun&amp;Description=description&amp;players=arun,sai&amp;community=true&amp;Location=US&amp;skills=batting&amp;analysis=true",
            CURLOPT_RETURNTRANSFER =&gt; true,
            CURLOPT_ENCODING =&gt; "",
            CURLOPT_MAXREDIRS =&gt; 10,
            CURLOPT_TIMEOUT =&gt; 30,
            CURLOPT_HTTP_VERSION =&gt; CURL_HTTP_VERSION_1_1,
            CURLOPT_CUSTOMREQUEST =&gt; "POST",
            CURLOPT_POSTFIELDS =&gt; "------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"filename\"; filename=\"Cielo_estrellado_by_Eduardo_Diez_Viñuela\"\r\nfile=\"filedir\"; filedir=\"@/home/alaa/Desktop/Cielo_estrellado_by_Eduardo_Diez_Viñuela.jpg\"\r\nContent-Type: image/jpeg\r\n\r\n\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--",
        CURLOPT_HTTPHEADER =&gt; array(
          "Cache-Control: no-cache",
          "content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW"
        ),
      ));
  
      $response = curl_exec($curl);
      $err = curl_error($curl);
  
      curl_close($curl);
  
      if ($err) {
        echo "cURL Error #:" . $err;
      } else {
        echo $response;
      };
      }
  </code></pre>
  
  <p>And this is Html </p>
  
  <pre><code>&lt;form  method="post" enctype="multipart/form-data"&gt;
          &lt;input type="file" name="files"&gt;
          &lt;input type="submit" name=""&gt;
      &lt;/form&gt;
  </code></pre>
  
  <p>The process succeed and the files appear in the storage but they are 0 bytes Please help me.</p>