private function initiateResumableUpload($uploadUrl)
    {
        $requestOptions = [];
        $requestOptions[RequestOptions::HEADERS] = [
            'Content-Type' => 'application/xml',
            'Content-Length' => 0,
            'x-goog-resumable' => 'start'
        ];
        if (!empty($this->connectionSettings->getProxyUrl())) {
            $requestOptions[RequestOptions::PROXY] = [
                'https' => $this->connectionSettings->getProxyUrl()
            ];
        }
        // This follows the Google Cloud Storage guidelines for initiating
        // resumable uploads:
        // https://cloud.google.com/storage/docs/resumable-uploads-xml
        $response =
            $this->httpClient->request('POST', $uploadUrl, $requestOptions);

        return $response->getHeader('Location')[0];
    }