....
$fileContent = file_get_contents($fileName);
$this->headers[] = substr($fileName, strrpos($fileName, ".") + 1) == "png" ?
"Content-Type: image/png" :
"Content-Type: image/jpeg";
$this->headers[] = "Expect: 100-continue";
$this->headers[] = "Content-Length: ".filesize($fileName);
$this->headers[] = "Etag: ".hash("md5", $fileContent, false);
$this->headers[] = "Sha256: ".hash("sha256", $fileContent, false);
curl_setopt($this->cURLsession, CURLOPT_HTTPHEADER, $this->headers);
curl_setopt($this->cURLsession, CURLOPT_CUSTOMREQUEST, "PUT");
curl_setopt($this->cURLsession, CURLOPT_POSTFIELDS, $fileContent);
$curlResult = $this->execCurl();
....
Ну, к примеру это: