protected function prePutRequest($data)
    {
        $this->tmpFile = tmpfile();
        fwrite($this->tmpFile, $data);
        rewind($this->tmpFile);

        $this->setConnectionOptions(array(
            CURLOPT_PUT => true,
            CURLOPT_INFILE => $this->tmpFile,
            CURLOPT_INFILESIZE => strlen($data),
        ));
        return $this;
    }