From 13bc2e1859f91d8dd1f617505d56cddfc9cdd54c Mon Sep 17 00:00:00 2001 From: Steve Howell Date: Tue, 7 May 2013 17:19:24 -0400 Subject: [PATCH] Handle "REQUEST ENTITY TOO LARGE" during file uploads. The filedrop library has a few canned errors, but it seems to mostly let server errors come through. We try to trap 413s to give a more descriptive error than "unknown," but this is just a bandaid fix, and we should see what's wrong with our prod configuration. (imported from commit eac26406866d80340f24dbdca9f34408ddb92462) --- zephyr/static/js/compose.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/zephyr/static/js/compose.js b/zephyr/static/js/compose.js index 33da6982dc..ad5dd4d16a 100644 --- a/zephyr/static/js/compose.js +++ b/zephyr/static/js/compose.js @@ -591,6 +591,9 @@ $(function () { // sanitizatio not needed as the file name is not potentially parsed as HTML, etc. msg = "\"" + file.name + "\" was too large; the maximum file size is 25MiB."; break; + case 'REQUEST ENTITY TOO LARGE': + msg = "Sorry, the file was too large."; + break; default: msg = "An unknown error occured."; break;