Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

documentation: Update upload_file python api documentation.

vagrant92f4d206a6c9
diff --git a/zerver/openapi/python_examples.py b/zerver/openapi/python_examples.py
index 80fa2719945..85ded3aaae9 100644
--- a/zerver/openapi/python_examples.py
+++ b/zerver/openapi/python_examples.py
@@ -1055,12 +1055,9 @@ def upload_file(client: Client) -> None:
# {code_example|start}
# Upload a file
with open(path_to_file, "rb") as fp:
- result = client.call_endpoint(
- "user_uploads",
- method="POST",
- files=[fp],
- )
+ result = client.upload_file(fp)
+ # Share the file by including it in a message.
client.send_message(
{
"type": "stream",