- πΈπ°Slovakia poker10
Maybe we can try the approach from #2787243: Multiple AJAX File uploads in one form breaks for anonymous user β .
With Drupal's page cache enabled and more than one file upload field on a form, uploading to the first via the "Upload" button and then trying the same for the second produces an erroneous "the uploaded file likely exceeded the maximum file size" error message.
For Drupal 7, #2339109: Multiple file uploads don't work with Drupal cache enabled β contains a lot of discussion of the problem and steps to reproduce it using Webform.
I assume Drupal 8 is affected too since the code is similar, but I haven't tested.
One possible way to fix this - just remove the code that throws the error. The error message suggests that it's there to catch cases where a file is bigger than the upload limit supported by the server, although it's not obvious how the code is related to that - clearly there's at least one case (this one) where it works incorrectly. And even so, the form API validation should already be preventing files that are too large from ever being uploaded in the first place.
Needs work
7.0 β°οΈ
The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Maybe we can try the approach from #2787243: Multiple AJAX File uploads in one form breaks for anonymous user β .