Root cause: the export embeds the whole gallery as base64 directly in the JSON (that's how it stays a single self-contained file), which pushes a realistic export well past 40MB. PHP's post_max_size/upload_max_filesize default to values well under that on most hosting, so the browser's upload got silently discarded before the app ever saw it - PHP clears $_FILES and $_POST once post_max_size is exceeded, and the leftover raw body in php://input is unparsed multipart data, not JSON, so it fell into a generic "invalid file" 422 with no indication of what actually went wrong. Reproduced locally with a real ~43MB export against the previous 40M limit. Raises the limits to 200M via two paths, since we don't know which PHP SAPI the various hosting targets (All-Inkl, the Plesk test server) use: hifi/.htaccess sets php_value overrides for classic Apache module PHP, guarded by <IfModule> checks for several common module names so hosts running PHP-FPM/CGI (which ignore php_value and would otherwise choke on an unrecognized directive) skip the block instead of 500ing the entire site; hifi/api/public/.user.ini covers exactly that FPM/CGI case, which mod_php hosts in turn simply don't read. Also makes SettingsController::importData() detect an oversized upload by comparing Content-Length against the configured post_max_size, and report the actual limit instead of the generic corrupt-file message - so if some host's real limit is still too low, the admin sees why instead of a dead end. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
8 lines
444 B
INI
8 lines
444 B
INI
; Groessere Upload-/POST-Limits fuer den Daten-Export/-Import im Admin-Bereich
|
|
; (der Export bettet die Bildergalerie als Base64 direkt in die JSON-Datei ein,
|
|
; das kann schnell 40+ MB werden). Greift auf PHP-FPM/CGI-Hosting (z.B. viele
|
|
; Shared-Hosting-Umgebungen) - fuer klassisches Apache-Modul-PHP (mod_php)
|
|
; uebernimmt stattdessen der php_value-Block in hifi/.htaccess.
|
|
upload_max_filesize = 200M
|
|
post_max_size = 200M
|
|
memory_limit = 512M
|