Form breaks if upload is too big (error:413 Request Entity Too Large)
-
Hi,
CF7 doesn’t appear to catch the 413 error which causes the form to be unusable. I can see it’s stuck in submitting with spinner spinning endlessly:
<form class="wpcf7-form submitting"..
For example if your form upload limit is 10mb and you attempt to upload a 20mb file, you will see NGINX server return the 413 error which is fine but CF7 breaks, no friendly response even though cf7 has a message for upload size too large.
I use to have some custom code to catch this when cf7 use to use ajax, but it’s now using fetch so I don’t think this would work:
$(document).ajaxError(function (e, xhr, opt) { if ($("#supportForm").hasClass("wpcf7-form")) { if (xhr.status === 413) { setTimeout(function () {
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Form breaks if upload is too big (error:413 Request Entity Too Large)’ is closed to new replies.