private function initiateUpload($url, $params)
    {
        $ch = curl_init($this->host.'/'.$url);

        if (!empty($params['file']))
        {
            $params['file'] .= ";filename=".basename($params['file']);
        }

        curl_setopt($ch, CURLOPT_HTTPHEADER, array(
            "Authentication: Token ". $this->token
        ));
        curl_setopt($ch, CURLOPT_POST, 1);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($ch, CURLOPT_POSTFIELDS, $params);

        return $ch;
    }