Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/storage/src/storage3/_async/file_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ async def create_signed_upload_url(
)
data = response.json()
full_url: urllib.parse.ParseResult = urllib.parse.urlparse(
str(self._client.base_url) + cast(str, data["url"]).lstrip("/")
str(self._base_url) + cast(str, data["url"]).lstrip("/")
)
query_params = urllib.parse.parse_qs(full_url.query)
if not query_params.get("token"):
Expand Down
2 changes: 1 addition & 1 deletion src/storage/src/storage3/_sync/file_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def create_signed_upload_url(
)
data = response.json()
full_url: urllib.parse.ParseResult = urllib.parse.urlparse(
str(self._client.base_url) + cast(str, data["url"]).lstrip("/")
str(self._base_url) + cast(str, data["url"]).lstrip("/")
)
query_params = urllib.parse.parse_qs(full_url.query)
if not query_params.get("token"):
Expand Down
2 changes: 1 addition & 1 deletion src/storage/tests/_async/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ async def test_client_create_signed_upload_url(
data = await storage_file_client.create_signed_upload_url(path)
assert data["path"] == path
assert data["token"]
expected_url = f"{storage_file_client._client.base_url}object/upload/sign/{storage_file_client.id}/{path.lstrip('/')}"
expected_url = f"{storage_file_client._base_url}object/upload/sign/{storage_file_client.id}/{path.lstrip('/')}"
assert data["signed_url"].startswith(expected_url)


Expand Down
2 changes: 1 addition & 1 deletion src/storage/tests/_sync/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ def test_client_create_signed_upload_url(
data = storage_file_client.create_signed_upload_url(path)
assert data["path"] == path
assert data["token"]
expected_url = f"{storage_file_client._client.base_url}object/upload/sign/{storage_file_client.id}/{path.lstrip('/')}"
expected_url = f"{storage_file_client._base_url}object/upload/sign/{storage_file_client.id}/{path.lstrip('/')}"
assert data["signed_url"].startswith(expected_url)


Expand Down