diff --git a/templates/zerver/api/upload-file.md b/templates/zerver/api/upload-file.md index d26367c2ab..db855add13 100644 --- a/templates/zerver/api/upload-file.md +++ b/templates/zerver/api/upload-file.md @@ -4,6 +4,15 @@ Upload a single file and get the corresponding URI. `POST {{ api_url }}/v1/user_uploads` +Initially, only you will be able to access the link. To share the +uploaded file, you'll need to [send a message][send-message] +containing the resulting link. Users who can already access the link +can reshare it with other users by sending additional Zulip messages +containing the link. + +[uploaded-files]: /help/manage-your-uploaded-files +[send-message]: /api/send-message + ## Usage examples {start_tabs} diff --git a/zerver/openapi/python_examples.py b/zerver/openapi/python_examples.py index 5d2d59b365..cc3e10f934 100644 --- a/zerver/openapi/python_examples.py +++ b/zerver/openapi/python_examples.py @@ -882,6 +882,13 @@ def upload_file(client): method='POST', files=[fp] ) + + client.send_message({ + "type": "stream", + "to": "Denmark", + "topic": "Castle", + "content": "Check out [this picture](%s) of my castle!" % (result['uri'],) + }) # {code_example|end} validate_against_openapi_schema(result, '/user_uploads', 'post', '200')