Fix uploads over 4 GB failing with a misleading size error
Livewire's temporary upload rule was hard-coded to max:4194304 (4 GB), so /livewire/upload-file rejected any larger file no matter how high PHP_UPLOAD_MAX_FILESIZE or the admin's max file size were set. _uploadErrored() then replaced Livewire's actual message with "file exceeds the maximum size of N MB", quoting the admin limit the file was under. The cap is removed: PHP's upload_max_filesize is the hard limit and the admin setting is still enforced in updatedFiles() and createShare(). A rejected upload now logs the real validation errors and tells the user the server could not accept the file. max_upload_time is configurable via LIVEWIRE_MAX_UPLOAD_TIME, and the README documents every limit large uploads depend on. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017XYnWFt9pJEwvAmNFN38XD
This commit is contained in:
co-authored by
Claude Opus 5
parent
992f3da084
commit
126c0a5cdb
@@ -86,6 +86,19 @@ Migrations run automatically on startup. Open your configured domain — the Set
|
||||
| `caddy_data` | `/data` | TLS certificates |
|
||||
| `caddy_config` | `/config` | Caddy configuration |
|
||||
|
||||
**Large files:**
|
||||
|
||||
Uploads beyond the defaults need these limits raised together:
|
||||
|
||||
| Limit | Where | Default |
|
||||
|-------|-------|---------|
|
||||
| `PHP_UPLOAD_MAX_FILESIZE` / `PHP_POST_MAX_SIZE` | Environment | `4G` — hard cap per file / per upload batch |
|
||||
| Max file size / Max size per share | Admin → Settings | 100 MB / 2 GB |
|
||||
| `LIVEWIRE_MAX_UPLOAD_TIME` | Environment | 30 minutes per upload |
|
||||
| `OCTANE_MAX_EXECUTION_TIME` / `PHP_MAX_EXECUTION_TIME` | Environment | 300 seconds — encrypting a large file takes a while |
|
||||
|
||||
Behind a reverse proxy, raise its request body limit and read timeout as well (nginx: `client_max_body_size`, `proxy_read_timeout`).
|
||||
|
||||
### Manual (without Docker)
|
||||
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user