mirror of
https://github.com/zulip/zulip.git
synced 2025-11-07 07:23:22 +00:00
upload: Limit total size of files uploaded by a user to 1GB.
Fixes #3884.
This commit is contained in:
committed by
Tim Abbott
parent
777b7d4cb7
commit
866a7b06b2
@@ -360,7 +360,12 @@
|
||||
|
||||
// Pass any errors to the error option
|
||||
if (xhr.status < 200 || xhr.status > 299) {
|
||||
on_error(xhr.statusText, xhr.status);
|
||||
if (this.responseText.includes("Upload would exceed your maximum quota.")) {
|
||||
var errorString = "QuotaExceeded";
|
||||
on_error(errorString, xhr.status);
|
||||
} else {
|
||||
on_error(xhr.statusText, xhr.status);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user