PHP Curl通信错误到内部服务器

I am trying to use this code to upload file using Curl communication in PHP that contains user, password and session.

Afterwards, I am getting error Https 400. I tried to fix it using other information but still get stuck

$url = 'https://mysite/ses/upload';  // url name

// making array with file, password, username and connection

$uploadRequest = array(
    'file' => 'request/first-last-20180615191901.270',
    'username' => 'USER',
    'password' => 'Password',
    'connection' => 'HETS_SESEACCI001',
);

// initializing curl 

$curl = curl_init();

// for avoiding ssl self signed certificate error 

curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);

// now drafting all details with parameters 

curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $uploadRequest);


$response = curl_exec($curl);

// if error display error

if(curl_error($curl)) { 
   echo 'Curl error :- ' . curl_error($curl);
} else {
    // creating response file and pass to response.php for parsing
    if ($response) {
        $responsefilename = $output['firstName'].'-'.$output['lastName'].'-'.$output['Timestamp'].'.271';
        $responsedirectory = "response/";
        $responsefile = $responsedirectory.$responsefilename;
        $file2 = fopen($responsefile,'w+') or die("Unable to open response file!");
        fwrite($file2,$response);
        fclose($file2);
        $_SESSION['response-file'] = $responsefile;
        header("Location: response.php");
    };
}
curl_close($curl);

// communication Error

enter code here
HTTP ERROR: 400
Problem accessing /ses/upload. Reason:

Missing request body