diff --git a/pyproject.toml b/pyproject.toml index 5f0281f4..e0cd95d2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "uipath" -version = "2.0.62" +version = "2.0.63" description = "Python SDK and CLI for UiPath Platform, enabling programmatic interaction with automation services, process management, and deployment tools." readme = { file = "README.md", content-type = "text/markdown" } requires-python = ">=3.10" diff --git a/src/uipath/_services/attachments_service.py b/src/uipath/_services/attachments_service.py index d00e6927..fe88fe59 100644 --- a/src/uipath/_services/attachments_service.py +++ b/src/uipath/_services/attachments_service.py @@ -384,13 +384,14 @@ def upload( if source_path: # Upload from file with open(source_path, "rb") as file: + file_content = file.read() if result["BlobFileAccess"]["RequiresAuth"]: self.request( - "PUT", upload_uri, headers=headers, files={"file": file} + "PUT", upload_uri, headers=headers, content=file_content ) else: with httpx.Client() as client: - client.put(upload_uri, headers=headers, files={"file": file}) + client.put(upload_uri, headers=headers, content=file_content) else: # Upload from memory # Convert string to bytes if needed @@ -519,13 +520,14 @@ async def main(): if source_path: # Upload from file with open(source_path, "rb") as file: + file_content = file.read() if result["BlobFileAccess"]["RequiresAuth"]: await self.request_async( - "PUT", upload_uri, headers=headers, files={"file": file} + "PUT", upload_uri, headers=headers, content=file_content ) else: with httpx.Client() as client: - client.put(upload_uri, headers=headers, files={"file": file}) + client.put(upload_uri, headers=headers, content=file_content) else: # Upload from memory # Convert string to bytes if needed