Skip to content

Commit 89f34ca

Browse files
carlinmackfenekku
authored andcommitted
chore: deprecate FILES_REST in favour of RDM_FILES
This was deprecated in RDM records in August 2024 https://github.com/inveniosoftware/invenio-rdm-records/pull/1789/changes We should've updated the docs at that point but it was missed
1 parent c767c11 commit 89f34ca

1 file changed

Lines changed: 13 additions & 20 deletions

File tree

docs/operate/customize/file-uploads/upload_limits.md

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ Limiting the maximum size for file uploads can be desirable for a few reasons, e
66
## Invenio Configuration
77

88
`Invenio-Files-REST` provides some [configuration values](https://invenio-files-rest.readthedocs.io/en/latest/configuration.html) that are relevant for limiting file uploads.
9-
The most relevant ones are `FILES_REST_DEFAULT_MAX_FILE_SIZE` which limits the maximum size for *each* uploaded file (in bytes) and `FILES_REST_DEFAULT_QUOTA_SIZE` which limits the maximum overall size of *all* files uploaded per record (also in bytes).
9+
The most relevant ones are `RDM_FILES_DEFAULT_MAX_FILE_SIZE` which limits the maximum size for *each* uploaded file (in bytes) and `RDM_FILES_DEFAULT_QUOTA_SIZE` which limits the maximum overall size of *all* files uploaded per record (also in bytes).
1010

11-
For instance, consider the case that the maximum file size is set to 10GiB, and the default quota is set to 30GiB.
12-
Then, the user can upload several files with a maximum size of 10GiB each.
13-
The user could upload 3 files with 10GiB each, or several smaller ones, or anything in between.
14-
However, the total size of all files deposited with a single record cannot exceed 30GiB.
11+
For instance, consider the case that the maximum file size is set to 10 GiB, and the default quota is set to 30 GiB.
12+
Then, the user can upload several files with a maximum size of 10 GiB each.
13+
The user could upload 3 files with 10 GiB each, or several smaller ones, or anything in between.
14+
However, the total size of all files deposited with a single record cannot exceed 30 GiB.
1515

1616
**Note** that the Flask configuration option `MAX_CONTENT_LENGTH` is only applied for multi-part form uploads (e.g. community logos), but not for the files deposited with records.
1717

@@ -22,16 +22,6 @@ Limiting the maximum size for file uploads and number of files is critical to av
2222

2323
### Configuration
2424

25-
#### Frontend (Deposit Form)
26-
Controls how much the user interface allows users to upload which can be configured in `invenio.cfg`:
27-
28-
```py
29-
APP_RDM_DEPOSIT_FORM_QUOTA = {
30-
"maxFiles": 100,
31-
"maxStorage": 30*10**9,
32-
}
33-
```
34-
3525
#### Backend (File Storage & Record Quotas)
3626

3727
Controls enforcement at the storage and API level:
@@ -43,13 +33,16 @@ RDM_FILES_DEFAULT_QUOTA_SIZE = 30 * 10**9
4333

4434
RDM_FILES_DEFAULT_MAX_FILE_SIZE = 10 * 10**9
4535
"""Max size per file 10 GB"""
36+
```
4637

47-
# Files REST layer (bucket quota)
48-
FILES_REST_DEFAULT_QUOTA_SIZE = 30 * 10**9
49-
"""Bucket total storage 30 GB"""
38+
#### Frontend (Deposit Form)
39+
Controls how much the user interface allows users to upload which can be configured in `invenio.cfg`:
5040

51-
FILES_REST_DEFAULT_MAX_FILE_SIZE = 10 * 10**9
52-
"""Bucket max file size 10 GB"""
41+
```py
42+
APP_RDM_DEPOSIT_FORM_QUOTA = {
43+
"maxFiles": 100,
44+
"maxStorage": RDM_FILES_DEFAULT_QUOTA_SIZE,
45+
}
5346
```
5447

5548
### Quota lookup priority

0 commit comments

Comments
 (0)