Skip to content

Commit 8972344

Browse files
committed
docs: rename legacy camelCase config keys to snake_case in guides
Sync zh/en guide docs with migration 007 key names (upload_size, open_upload, enable_chunk, expire_style, error_count, etc.) so existing deployments following the docs use the current schema.
1 parent 6e7580b commit 8972344

12 files changed

Lines changed: 218 additions & 218 deletions

File tree

‎docs/en/guide/configuration.md‎

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ On first startup, the system uses default configuration from `core/settings.py`.
2222
| `name` | string | `文件快递柜 - FileCodeBox` | Site name, displayed in page title and navigation bar |
2323
| `description` | string | `开箱即用的文件快传系统` | Site description, used for SEO |
2424
| `keywords` | string | `FileCodeBox, 文件快递柜...` | Site keywords, used for SEO |
25-
| `serverHost` | string | `0.0.0.0` | Service listening address |
26-
| `serverPort` | int | `12345` | Service listening port |
27-
| `serverWorkers` | int | `1` | Worker count; keep one worker for SQLite deployments |
25+
| `server_host` | string | `0.0.0.0` | Service listening address |
26+
| `server_port` | int | `12345` | Service listening port |
27+
| `server_workers` | int | `1` | Worker count; keep one worker for SQLite deployments |
2828

2929
### Notification Settings
3030

@@ -33,29 +33,29 @@ On first startup, the system uses default configuration from `core/settings.py`.
3333
| `notify_title` | string | `系统通知` | Notification title |
3434
| `notify_content` | string | Welcome message | Notification content, supports HTML |
3535
| `page_explain` | string | Legal disclaimer | Footer explanation text |
36-
| `robotsText` | string | `User-agent: *\nDisallow: /` | robots.txt content |
36+
| `robots_text` | string | `User-agent: *\nDisallow: /` | robots.txt content |
3737

3838
## Upload Settings
3939

4040
### File Upload Limits
4141

4242
| Setting | Type | Default | Description |
4343
|---------|------|---------|-------------|
44-
| `openUpload` | int | `1` | Enable upload functionality (1=enabled, 0=disabled) |
45-
| `uploadSize` | int | `10485760` | Maximum single file upload size (bytes), default 10MB |
46-
| `enableChunk` | int | `0` | Enable chunked upload (1=enabled, 0=disabled) |
44+
| `open_upload` | int | `1` | Enable upload functionality (1=enabled, 0=disabled) |
45+
| `upload_size` | int | `10485760` | Maximum single file upload size (bytes), default 10MB |
46+
| `enable_chunk` | int | `0` | Enable chunked upload (1=enabled, 0=disabled) |
4747
| `allowed_file_types` | list | `["*"]` | Allowed extensions; `*` allows every file type |
4848

4949
::: warning Note
50-
`uploadSize` is in bytes. 10MB = 10 * 1024 * 1024 = 10485760 bytes
50+
`upload_size` is in bytes. 10MB = 10 * 1024 * 1024 = 10485760 bytes
5151
:::
5252

5353
### Upload Rate Limiting
5454

5555
| Setting | Type | Default | Description |
5656
|---------|------|---------|-------------|
57-
| `uploadMinute` | int | `1` | Upload limit time window (minutes) |
58-
| `uploadCount` | int | `10` | Maximum uploads allowed within the time window |
57+
| `upload_minute` | int | `1` | Upload limit time window (minutes) |
58+
| `upload_count` | int | `10` | Maximum uploads allowed within the time window |
5959

6060
Example: Default configuration allows up to 10 uploads per minute.
6161

@@ -64,7 +64,7 @@ Example: Default configuration allows up to 10 uploads per minute.
6464

6565
| Setting | Type | Default | Description |
6666
|---------|------|---------|-------------|
67-
| `expireStyle` | list | `["day","hour","minute","forever","count"]` | Available expiration methods |
67+
| `expire_style` | list | `["day","hour","minute","forever","count"]` | Available expiration methods |
6868
| `max_save_seconds` | int | `0` | Maximum file retention time (seconds), 0 means no limit |
6969

7070
Expiration methods explained:
@@ -80,8 +80,8 @@ Expiration methods explained:
8080

8181
| Setting | Type | Default | Description |
8282
|---------|------|---------|-------------|
83-
| `themesSelect` | string | `themes/2024` | Currently active theme |
84-
| `themesChoices` | list | See below | Available themes list |
83+
| `themes_select` | string | `themes/2024` | Currently active theme |
84+
| `themes_choices` | list | See below | Available themes list |
8585

8686
Default available themes:
8787
```json
@@ -113,8 +113,8 @@ Default available themes:
113113
| Setting | Type | Default | Description |
114114
|---------|------|---------|-------------|
115115
| `admin_token` | string | Set during setup | Admin login password |
116-
| `showAdminAddr` | int | `0` | Show admin panel entry on homepage (1=show, 0=hide) |
117-
| `adminSessionExpire` | int | `2592000` | Admin session lifetime in seconds (30 days) |
116+
| `show_admin_addr` | int | `0` | Show admin panel entry on homepage (1=show, 0=hide) |
117+
| `admin_session_expire` | int | `2592000` | Admin session lifetime in seconds (30 days) |
118118

119119
::: danger Security Warning
120120
The setup page is shown automatically while the system is uninitialized. Complete setup before exposing a production service to the public internet.
@@ -126,9 +126,9 @@ The setup page is shown automatically while the system is uninitialized. Complet
126126

127127
| Setting | Type | Default | Description |
128128
|---------|------|---------|-------------|
129-
| `errorMinute` | int | `1` | Error limit time window (minutes) |
130-
| `errorCount` | int | `10` | Maximum errors allowed within the time window |
131-
| `trustedProxies` | list | `[]` | Trusted reverse-proxy IPs used to resolve client addresses |
129+
| `error_minute` | int | `1` | Error limit time window (minutes) |
130+
| `error_count` | int | `10` | Maximum errors allowed within the time window |
131+
| `trusted_proxies` | list | `[]` | Trusted reverse-proxy IPs used to resolve client addresses |
132132

133133
This setting prevents brute-force attacks on extraction codes.
134134

@@ -140,7 +140,7 @@ This setting prevents brute-force attacks on extraction codes.
140140
|---------|------|---------|-------------|
141141
| `file_storage` | string | `local` | Storage backend type |
142142
| `storage_path` | string | `""` | Custom storage path |
143-
| `storageLimit` | int | `0` | Total storage quota in bytes; 0 means unlimited |
143+
| `storage_limit` | int | `0` | Total storage quota in bytes; 0 means unlimited |
144144

145145
Supported storage types:
146146
- `local` - Local storage
@@ -160,11 +160,11 @@ Suitable for personal or small team use with relaxed limits:
160160
```python
161161
{
162162
"name": "My File Share",
163-
"uploadSize": 52428800, # 50MB
164-
"uploadMinute": 5, # 5 minutes
165-
"uploadCount": 20, # Max 20 uploads
166-
"expireStyle": ["day", "hour", "forever"],
167-
"showAdminAddr": 1
163+
"upload_size": 52428800, # 50MB
164+
"upload_minute": 5, # 5 minutes
165+
"upload_count": 20, # Max 20 uploads
166+
"expire_style": ["day", "hour", "forever"],
167+
"show_admin_addr": 1
168168
}
169169
```
170170

@@ -175,14 +175,14 @@ Suitable for public services requiring stricter limits:
175175
```python
176176
{
177177
"name": "Public File Box",
178-
"uploadSize": 10485760, # 10MB
179-
"uploadMinute": 1, # 1 minute
180-
"uploadCount": 5, # Max 5 uploads
181-
"errorMinute": 5, # 5 minutes
182-
"errorCount": 3, # Max 3 errors
183-
"expireStyle": ["hour", "minute", "count"],
178+
"upload_size": 10485760, # 10MB
179+
"upload_minute": 1, # 1 minute
180+
"upload_count": 5, # Max 5 uploads
181+
"error_minute": 5, # 5 minutes
182+
"error_count": 3, # Max 3 errors
183+
"expire_style": ["hour", "minute", "count"],
184184
"max_save_seconds": 86400, # Max retention 1 day
185-
"showAdminAddr": 0
185+
"show_admin_addr": 0
186186
}
187187
```
188188

@@ -193,13 +193,13 @@ Suitable for enterprise internal use with large file and chunked upload support:
193193
```python
194194
{
195195
"name": "Enterprise File Transfer",
196-
"uploadSize": 1073741824, # 1GB
197-
"enableChunk": 1, # Enable chunked upload
198-
"uploadMinute": 10, # 10 minutes
199-
"uploadCount": 100, # Max 100 uploads
200-
"expireStyle": ["day", "forever"],
196+
"upload_size": 1073741824, # 1GB
197+
"enable_chunk": 1, # Enable chunked upload
198+
"upload_minute": 10, # 10 minutes
199+
"upload_count": 100, # Max 100 uploads
200+
"expire_style": ["day", "forever"],
201201
"file_storage": "s3", # Use S3 storage
202-
"showAdminAddr": 1
202+
"show_admin_addr": 1
203203
}
204204
```
205205

‎docs/en/guide/introduction.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ npm run dev
226226
## ❓ FAQ
227227

228228
### Q: How to modify upload size limit?
229-
A: Change `uploadSize` in admin panel
229+
A: Change `upload_size` in admin panel
230230

231231
### Q: How to configure storage engine?
232232
A: Select storage engine and configure parameters in admin panel

‎docs/en/guide/management.md‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ By default, the admin panel entry is not shown on the homepage. You can control
2727

2828
| Setting | Type | Default | Description |
2929
|---------|------|---------|-------------|
30-
| `showAdminAddr` | int | `0` | Show admin entry on homepage (1=show, 0=hide) |
30+
| `show_admin_addr` | int | `0` | Show admin entry on homepage (1=show, 0=hide) |
3131

3232
::: warning Security Recommendation
33-
For public services, it's recommended to keep `showAdminAddr` at `0` and access the admin panel directly via the `/admin` path to reduce the risk of malicious scanning.
33+
For public services, it's recommended to keep `show_admin_addr` at `0` and access the admin panel directly via the `/admin` path to reduce the risk of malicious scanning.
3434
:::
3535

3636
### Authentication Mechanism
@@ -240,15 +240,15 @@ Administrators can modify most configurations through the admin panel:
240240
| Category | Example Settings |
241241
|----------|------------------|
242242
| Basic Settings | `name`, `description`, `keywords`, `notify_title`, `notify_content` |
243-
| Upload Settings | `uploadSize`, `uploadMinute`, `uploadCount`, `openUpload`, `enableChunk` |
244-
| Expiration Settings | `expireStyle`, `max_save_seconds` |
245-
| Theme Settings | `themesSelect`, `opacity`, `background` |
246-
| Security Settings | `admin_token`, `showAdminAddr`, `errorMinute`, `errorCount` |
243+
| Upload Settings | `upload_size`, `upload_minute`, `upload_count`, `open_upload`, `enable_chunk` |
244+
| Expiration Settings | `expire_style`, `max_save_seconds` |
245+
| Theme Settings | `themes_select`, `opacity`, `background` |
246+
| Security Settings | `admin_token`, `show_admin_addr`, `error_minute`, `error_count` |
247247
| Storage Settings | `file_storage`, `storage_path` and storage backend-specific configurations |
248248

249249
::: warning Note
250250
- `admin_token` (admin password) cannot be set to empty
251-
- `themesChoices` (theme list) cannot be modified through the admin panel
251+
- `themes_choices` (theme list) cannot be modified through the admin panel
252252
- After modifying storage settings, existing files will not be automatically migrated
253253
:::
254254

@@ -382,7 +382,7 @@ Content-Type: application/json
382382
383383
{
384384
"admin_token": "new-password",
385-
"uploadSize": 52428800
385+
"upload_size": 52428800
386386
}
387387
```
388388

0 commit comments

Comments
 (0)