Change slightly how 413s are handled in the frontend script just for testing, references #224

merge-requests/208/head
Thomas Lynch 4 years ago
parent 7d87819ad4
commit 3ce4ea7a10
  1. 8
      gulp/res/js/forms.js

@ -220,8 +220,12 @@ class formHandler {
} else { } else {
if (xhr.status === 413) { if (xhr.status === 413) {
this.clearFiles(); this.clearFiles();
} //not json, must be nginx response
if (json) { doModal({
'title': 'Payload Too Large',
'message': 'Your upload was too large',
});
} else if (json) {
if (!this.captchaField && json.message === 'Incorrect captcha answer') { if (!this.captchaField && json.message === 'Incorrect captcha answer') {
captchaController.addMissingCaptcha(); captchaController.addMissingCaptcha();
this.captchaField = true; this.captchaField = true;

Loading…
Cancel
Save