mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 15:03:34 +00:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user