Skip to content

Commit

Permalink
Fix simple upload
Browse files Browse the repository at this point in the history
  • Loading branch information
ekouts committed Nov 6, 2024
1 parent 6d9d2d9 commit f9dac75
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions firecrest/v2/AsyncClient.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ async def _get_request(

# @_retry_requests # type: ignore
async def _post_request(
self, endpoint, additional_headers=None, data=None, files=None
self, endpoint, additional_headers=None, params=None, data=None, files=None
) -> httpx.Response:
url = f"{self._firecrest_url}{endpoint}"
headers = {
Expand All @@ -151,7 +151,12 @@ async def _post_request(
self.log(logging.DEBUG, f"Making POST request to {endpoint}")
with time_block(f"POST request to {endpoint}", logger):
resp = await self._session.post(
url=url, headers=headers, data=data, files=files, timeout=self.timeout
url=url,
headers=headers,
params=params,
data=data,
files=files,
timeout=self.timeout
)

return resp
Expand Down Expand Up @@ -567,7 +572,7 @@ async def upload(

resp = await self._post_request(
endpoint=f"/filesystem/{system_name}/ops/upload",
data={"targetPath": target_path},
params={"target_path": target_path},
files={"file": f}
)

Expand Down

0 comments on commit f9dac75

Please sign in to comment.