Hello ,
i want/need to convert this code(in php) to perl's code
but i am very stunk on the CURLOPT_POSTFIELDS part .
i'm not able to convert this to perl ..
could somebody helps me ?
$curl = curl_init($apiUrl);
$curlPostData = array(
"force_post" => urlencode("true"),
"auth_hash" => $authHash,
"urlencoded_filename" => urlencode($fileName),
"auth_token" => $authToken,
"xhr_uploader" => urlencode("true"),
'userfile_0"; filename="fake-name"' => $fileDa
+ta
);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HTTPHEADER, array("Content-Type: mu
+ltipart/form-data"));
curl_setopt($curl, CURLOPT_USERPWD, $pydioRestUser . ":" . $py
+dioRestPw);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $curlPostData);
$response = curl_exec($curl);