Add ability to limit amount uploaded by a user (#18527)

You can now configure how much media can be uploaded by a user in a
given time period.

Note the first commit here is a refactor of create/upload content
function
This commit is contained in:
Erik Johnston
2025-07-10 13:39:09 +01:00
committed by GitHub
parent b9b8775db7
commit 66daf0bfae
11 changed files with 292 additions and 73 deletions

View File

@@ -2086,6 +2086,23 @@ Example configuration:
max_upload_size: 60M
```
---
### `media_upload_limits`
*(array)* A list of media upload limits defining how much data a given user can upload in a given time period.
An empty list means no limits are applied.
Defaults to `[]`.
Example configuration:
```yaml
media_upload_limits:
- time_period: 1h
max_size: 100M
- time_period: 1w
max_size: 500M
```
---
### `max_image_pixels`
*(byte size)* Maximum number of pixels that will be thumbnailed. Defaults to `"32M"`.