From b7fac11d42f874e46fddf05c6a0095a45fd7b6ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Sirieix?= Date: Wed, 6 Dec 2023 16:32:51 +0100 Subject: [PATCH] fix/fix review --- python-client/chainlit_client/api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python-client/chainlit_client/api.py b/python-client/chainlit_client/api.py index 71c2db9..8b691fa 100644 --- a/python-client/chainlit_client/api.py +++ b/python-client/chainlit_client/api.py @@ -952,8 +952,8 @@ async def upload_file( upload_details = json_res["post"] object_key = upload_details["fields"]["key"] signed_url = json_res["signedUrl"] - headers = json_res["fields"]["headers"] - method = json_res["fields"]["method"] or "POST" + headers = upload_details["fields"]["headers"] + method = upload_details["fields"].get("method", "POST") # Prepare form data form_data = {} # type: Dict[str, Tuple[Union[str, None], Any]]