mirror of
https://github.com/zulip/zulip.git
synced 2026-06-24 21:08:25 +08:00
The term `parameter` is a better word than `argument` for data passed to an API endpoint; this is why OpenAPI uses in their terminology. Replace `argument` with `parameter` in the API docs to improve their readability. Fixes #15435.
882 B
882 B
Upload a file
{generate_api_description(/user_uploads:post)}
Usage examples
{start_tabs}
{tab|python}
{generate_code_example(python)|/user_uploads:post|example}
{tab|curl}
{generate_code_example(curl)|/user_uploads:post|example}
{end_tabs}
Parameters
As described above, the file to upload must be provided in the request's body.
Maximum file size
The maximum file size for uploads can be configured by the
administrator of the Zulip server by setting MAX_FILE_UPLOAD_SIZE
in the server's settings. MAX_FILE_UPLOAD_SIZE defaults
to 25MB.
Response
Return values
{generate_return_values_table|zulip.yaml|/user_uploads:post}
Example response
A typical successful JSON response may look like:
{generate_code_example|/user_uploads:post|fixture(200)}