You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-07 10:46:24 +03:00
Don't show the error dialog if the request was canceled. Handle 'request entity too large'.
This commit is contained in:
@@ -108,11 +108,17 @@ class ContentMessages {
|
|||||||
return matrixClient.sendMessage(roomId, content);
|
return matrixClient.sendMessage(roomId, content);
|
||||||
}, function(err) {
|
}, function(err) {
|
||||||
dis.dispatch({action: 'upload_failed', upload: upload});
|
dis.dispatch({action: 'upload_failed', upload: upload});
|
||||||
var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
|
if (!upload.canceled) {
|
||||||
Modal.createDialog(ErrorDialog, {
|
var desc = "The file '"+upload.fileName+"' failed to upload.";
|
||||||
title: "Upload Failed",
|
if (err.http_status == 413) {
|
||||||
description: "The file '"+upload.fileName+"' failed to upload."
|
desc = "The file '"+upload.fileName+"' exceeds this home server's size limit for uploads";
|
||||||
});
|
}
|
||||||
|
var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
|
||||||
|
Modal.createDialog(ErrorDialog, {
|
||||||
|
title: "Upload Failed",
|
||||||
|
description: desc
|
||||||
|
});
|
||||||
|
}
|
||||||
}).finally(function() {
|
}).finally(function() {
|
||||||
var inprogressKeys = Object.keys(self.inprogress);
|
var inprogressKeys = Object.keys(self.inprogress);
|
||||||
for (var i = 0; i < self.inprogress.length; ++i) {
|
for (var i = 0; i < self.inprogress.length; ++i) {
|
||||||
|
|||||||
Reference in New Issue
Block a user