Update Media Settings
Updates the media related settings of the project
HTTP Request
PATCH/api/settings/media
Authorization
Authorization
- Required: Yes
- Permission: Staff with MediaSettingsPermission or Admin
- Permission Code: 1067
- Authentication: Token authentication
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| media_max_upload_size | PositiveInteger | No | Defines the maximum upload size in bytes that users are allowed to upload |
Example Requests
- 🐍 Python
- 🌐 Curl
1import requests
2
3# Update media settings
4response = requests.patch('http://www.example.com/api/settings/media',
5 headers={'Authorization': 'Token <your_api_key>'},
6 json={
7 "media_max_upload_size": 10485760 // 10Mb
8 }
9)
10print(response.json())1# Update media settings
2curl "http://www.example.com/api/settings/media" -H "Authorization: Token <your_api_key>" -X PATCH -d '{
3 "media_max_upload_size": 10485760
4}'Response Fields
| Field | Type | Description |
|---|---|---|
| media_max_upload_size | PositiveInteger | Defines the maximum file upload size for users (default=2097152bytes) |
Example Response
{
"media_max_upload_size": 10485760
}
Notes
- the
media_max_upload_sizehas an upper limit which is set as a project parameter by the system admin. For example if the higher limit for a project is set to 50 mega bytes, themedia_max_upload_sizemay not be higher than that value.