|
8 | 8 | from io import BufferedReader |
9 | 9 | from pathlib import Path |
10 | 10 | from typing import Any, BinaryIO, Literal, TextIO, cast, overload |
11 | | -from urllib.parse import urljoin, urlparse |
| 11 | +from urllib.parse import urlparse |
12 | 12 |
|
13 | 13 | from cognite.client._api_client import APIClient |
14 | 14 | from cognite.client._constants import _RUNNING_IN_BROWSER, DEFAULT_LIMIT_READ |
|
28 | 28 | ) |
29 | 29 | from cognite.client.data_classes.data_modeling import NodeId |
30 | 30 | from cognite.client.exceptions import CogniteAPIError, CogniteAuthorizationError, CogniteFileUploadError |
31 | | -from cognite.client.utils._auxiliary import find_duplicates |
| 31 | +from cognite.client.utils._auxiliary import append_url_path, find_duplicates |
32 | 32 | from cognite.client.utils._concurrency import execute_tasks |
33 | 33 | from cognite.client.utils._identifier import Identifier, IdentifierSequence |
34 | 34 | from cognite.client.utils._validation import process_asset_subtree_ids, process_data_set_ids |
@@ -646,7 +646,7 @@ def _upload_bytes(self, content: bytes | TextIO | BinaryIO, returned_file_metada |
646 | 646 | if urlparse(upload_url).netloc: |
647 | 647 | full_upload_url = upload_url |
648 | 648 | else: |
649 | | - full_upload_url = urljoin(self._config.base_url, upload_url) |
| 649 | + full_upload_url = append_url_path(self._config.base_url, upload_url) |
650 | 650 | file_metadata = FileMetadata._load(returned_file_metadata) |
651 | 651 | upload_response = self._http_client_with_retry.request( |
652 | 652 | "PUT", |
|
0 commit comments