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)
This commit is contained in:
Steve Howell
2013-05-07 17:19:24 -04:00
committed by Tim Abbott
parent 567d04d386
commit 13bc2e1859

View File

@@ -591,6 +591,9 @@ $(function () {
// sanitizatio not needed as the file name is not potentially parsed as HTML, etc. // 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."; msg = "\"" + file.name + "\" was too large; the maximum file size is 25MiB.";
break; break;
case 'REQUEST ENTITY TOO LARGE':
msg = "Sorry, the file was too large.";
break;
default: default:
msg = "An unknown error occured."; msg = "An unknown error occured.";
break; break;