- πΊπΈUnited States tstermitz Colorado
Suggestion #10 worked for me, however...
I had to add the directive in two locations, the main server block and also the Location PHP block. - πΊπΈUnited States douggreen Winchester, VA
I tested this on 8.9.x, 9.5.x, and 10.1.x before finding this issue. At first I thought this was a regression, because we have a test for it (MaximumFileSizeExceededUploadTest.php) which was added in #1489692: Incorrect handling of file upload limit exceeded - file widget disappears β . However the test seems to not catch this (I couldn't get it to run locally on my Apple M1 chip under ddev).
This is easy to reproduce with standard core + media module, try to upload a document that is more than the max upload size (100M by default if using ddev). The upload fails silently. A page refresh shows no warnings.
- πΊπΈUnited States douggreen Winchester, VA
The comment about it being a bad configuration in #10 is wrong IMO. Someone will always try to upload a file that's larger than the configured system, and we shouldn't fail silently. Additionally, there are many hosts where you can't increase this value, and it will never be unlimited. A previous posted mentioned that Acquia frequently had this problem. We have this problem on Pantheon with a 150M file and a 100M limit. I think it's reasonable to have a limit but not reasonable to fail silently to the user.
- πΊπΈUnited States philosurfer
I like the idea of an ajax capturing the 413 response and overlaying it with an option to view full raw response string.
- π¦πΊAustralia dpi Perth, Australia
An issue was recently committed that shows messages for AJAX errors:
Can we verify if this helps resolve the issue, or can serve as a foundation/example for improvement here
We had the same issue while uploading the large files. The culprit was the client_body_buffer_size setting. It was set to 200MB. Basically, the buffer was too big and nginx was not able to allocate so much memory for keeping the file inside it. We had to lower the buffer to a normal value, so that file is buffered to a temp file during upload and the issue was resolved. Here is a detailed explanation.
- π²π¦Morocco b.khouy π²π¦ Morocco
The issue generally occurs when you try to upload a file that exceeds the
post_max_size
setting in PHP configuration. Hereβs a summary:- If
UploadedFileSize <= upload_max_filesize
, the file will upload successfully. - If
upload_max_filesize < UploadedFileSize <= post_max_size
, a validation error message will appear. - If
UploadedFileSize > post_max_size
, nothing happens (which is the current issue being discussed).
- If