public function upload(ApiClientContract $api, $path, $body, array $params = [], $verifyChecksum = true)
    {
        $response = $api->request('PUT', $path, [
            'headers' => $this->convertUploadParamsToHeaders($body, $params, $verifyChecksum),
            'body' => $body,
            'query' => $this->extractQueryParameters($params),
        ]);

        if ($response->getStatusCode() !== 201) {
            throw new UploadFailedException('Unable to upload file.', $response->getStatusCode());
        }

        return $response->getHeaderLine('ETag');
    }