title: Sending files from wordpress server to another server
body: <p>I am trying to send some files from wordpress to another server, but i always get error
  Here is example of my code:</p>
  
  <pre><code>$path = wp_upload_dir();
  $file = @fopen($path['path'] . "/ORDERS.csv", "r");
  $file_size = filesize($path['path'] . "/ORDERS.csv");
  $file_data = fread($file, $file_size);
  $args = array(
      'headers' =&gt; array('Content-Type' =&gt; 'application/json; charset=utf-8'),
      'body' =&gt; array('Customers' =&gt; $file_data, 'Orders' =&gt; $file_data, 'Products' =&gt; $file_data)
  );
  $result = wp_remote_post('https://example.com/upload', $args);
  $login_token_response = wp_remote_retrieve_body($result);
  </code></pre>
  
  <p>I am always receiving error like this</p>
  
  <pre><code>{
      "title": "One or more validation errors occurred.",
      "status": 400,
      "traceId": "|8de9ae17-4a6692f375d9bc1b.",
      "errors": {
          "Orders": ["'Orders' must not be empty.", "Orders file can't be empty"],
          "Products": ["'Products' must not be empty.", "Products file can't be empty"],
          "Customers": ["'Customers' must not be empty.", "Customers file can't be empty"]
      }
  }
  </code></pre>
  
  <p>Like I am doing something wrong, any ide?</p>