2021-05-22 13:21:18 +02:00
|
|
|
{generate_api_title(/user_uploads:post)}
|
2018-02-25 01:01:45 +01:00
|
|
|
|
2020-04-28 20:00:46 +02:00
|
|
|
{generate_api_description(/user_uploads:post)}
|
2019-11-30 01:10:18 +01:00
|
|
|
|
2018-02-25 01:01:45 +01:00
|
|
|
## Usage examples
|
|
|
|
|
2018-09-17 16:27:32 +02:00
|
|
|
{start_tabs}
|
2019-10-16 13:11:07 +02:00
|
|
|
|
2018-09-17 16:27:32 +02:00
|
|
|
{tab|python}
|
2019-10-16 13:11:07 +02:00
|
|
|
|
2018-06-21 03:04:05 +02:00
|
|
|
{generate_code_example(python)|/user_uploads:post|example}
|
2019-10-16 13:11:07 +02:00
|
|
|
|
2021-06-02 18:36:25 +02:00
|
|
|
{generate_code_example(javascript)|/user_uploads:post|example}
|
|
|
|
|
2019-10-16 13:11:07 +02:00
|
|
|
{tab|curl}
|
|
|
|
|
|
|
|
{generate_code_example(curl)|/user_uploads:post|example}
|
|
|
|
|
2018-09-17 16:27:32 +02:00
|
|
|
{end_tabs}
|
2018-02-25 01:01:45 +01:00
|
|
|
|
2020-06-18 15:35:25 +02:00
|
|
|
## Parameters
|
2018-02-25 01:01:45 +01:00
|
|
|
|
2018-12-12 19:49:14 +01:00
|
|
|
As described above, the file to upload must be provided in the
|
|
|
|
request's body.
|
2018-02-25 01:01:45 +01:00
|
|
|
|
|
|
|
## 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][1]. `MAX_FILE_UPLOAD_SIZE` defaults
|
|
|
|
to 25MB.
|
|
|
|
|
|
|
|
[1]: https://zulip.readthedocs.io/en/latest/subsystems/settings.html#server-settings
|
|
|
|
|
|
|
|
## Response
|
|
|
|
|
2020-05-20 11:57:57 +02:00
|
|
|
{generate_return_values_table|zulip.yaml|/user_uploads:post}
|
2018-02-25 01:01:45 +01:00
|
|
|
|
|
|
|
#### Example response
|
|
|
|
|
2018-06-21 03:04:05 +02:00
|
|
|
{generate_code_example|/user_uploads:post|fixture(200)}
|
2021-06-07 22:53:29 +02:00
|
|
|
|
|
|
|
{generate_code_example|/user_uploads:post|fixture(400)}
|